Activate retry code on any curl submit failure.
Previously, we were only going into the retry block for time out conditions. But a "could not connect" response, or really any sort of curl failure, is also a condition where we should retry the submit if the user has requested a retry.
This commit is contained in:
parent
87054972a7
commit
46df0b44ac
|
@ -536,8 +536,9 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const cmStdString& localprefix,
|
|||
<< std::endl);
|
||||
}
|
||||
|
||||
// If we time out or checksum fails, wait and retry
|
||||
if(res == CURLE_OPERATION_TIMEDOUT || this->HasErrors)
|
||||
// If curl failed for any reason, or checksum fails, wait and retry
|
||||
//
|
||||
if(res != CURLE_OK || this->HasErrors)
|
||||
{
|
||||
std::string retryDelay = this->GetOption("RetryDelay") == NULL ?
|
||||
"" : this->GetOption("RetryDelay");
|
||||
|
@ -552,7 +553,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const cmStdString& localprefix,
|
|||
for(int i = 0; i < count; i++)
|
||||
{
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
" Connection timed out, waiting " << delay << " seconds...\n");
|
||||
" Submit failed, waiting " << delay << " seconds...\n");
|
||||
|
||||
double stop = cmSystemTools::GetTime() + delay;
|
||||
while(cmSystemTools::GetTime() < stop)
|
||||
|
@ -582,7 +583,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const cmStdString& localprefix,
|
|||
this->ParseResponse(chunk);
|
||||
}
|
||||
|
||||
if(res != CURLE_OPERATION_TIMEDOUT && !this->HasErrors)
|
||||
if(res == CURLE_OK && !this->HasErrors)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue