summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2010-07-12 20:48:38 (GMT)
committerDavid Cole <david.cole@kitware.com>2010-07-12 20:48:38 (GMT)
commit46df0b44ac97859ab40dd0aa03ceca297a455587 (patch)
tree6d40fd216be0711bf1829b288994ef3dc5a116f4 /Source/CTest
parent87054972a703efac5137ab3d83f7f0dc9c10b9b3 (diff)
downloadCMake-46df0b44ac97859ab40dd0aa03ceca297a455587.zip
CMake-46df0b44ac97859ab40dd0aa03ceca297a455587.tar.gz
CMake-46df0b44ac97859ab40dd0aa03ceca297a455587.tar.bz2
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.
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index bfe515d..1e18259 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -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;
}