diff options
author | David Cole <david.cole@kitware.com> | 2009-09-04 18:00:26 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2009-09-04 18:00:26 (GMT) |
commit | 68b833208886bc07223db96b7377ee71939b7bc6 (patch) | |
tree | 65bbdcce8d711f96e018b4ff1ccc173ab26b2149 | |
parent | 5517e17bf936ad243536e793dc792f4dfccf2497 (diff) | |
download | CMake-68b833208886bc07223db96b7377ee71939b7bc6.zip CMake-68b833208886bc07223db96b7377ee71939b7bc6.tar.gz CMake-68b833208886bc07223db96b7377ee71939b7bc6.tar.bz2 |
Increase curl submit timeout. A submit will timeout if there are 120 seconds of very little activity. 30 seconds was too short.
-rw-r--r-- | Source/CTest/cmCTestSubmitHandler.cxx | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 8c98a85..5714596 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -32,6 +32,8 @@ PURPOSE. See the above copyright notices for more information. #include <sys/stat.h> +#define SUBMIT_TIMEOUT_IN_SECONDS_DEFAULT 120 + typedef std::vector<char> cmCTestSubmitHandlerVectorOfChar; static size_t @@ -124,13 +126,14 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const cmStdString& localprefix, } // enable uploading - ::curl_easy_setopt(curl, CURLOPT_UPLOAD, 1) ; + ::curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); // if there is little to no activity for too long stop submitting - ::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1) ; - ::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 30) ; + ::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1); + ::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, + SUBMIT_TIMEOUT_IN_SECONDS_DEFAULT); - ::curl_easy_setopt(curl, CURLOPT_UPLOAD, 1) ; + ::curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); cmStdString local_file = *file; if ( !cmSystemTools::FileExists(local_file.c_str()) ) @@ -313,11 +316,12 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const cmStdString& localprefix, } /* enable uploading */ - curl_easy_setopt(curl, CURLOPT_UPLOAD, 1) ; + curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); // if there is little to no activity for too long stop submitting - ::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1) ; - ::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 30) ; + ::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1); + ::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, + SUBMIT_TIMEOUT_IN_SECONDS_DEFAULT); /* HTTP PUT please */ ::curl_easy_setopt(curl, CURLOPT_PUT, 1); |