summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestCurl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest/cmCTestCurl.cxx')
-rw-r--r--Source/CTest/cmCTestCurl.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestCurl.cxx b/Source/CTest/cmCTestCurl.cxx
index 9a90f54..0fb4239 100644
--- a/Source/CTest/cmCTestCurl.cxx
+++ b/Source/CTest/cmCTestCurl.cxx
@@ -96,6 +96,13 @@ bool cmCTestCurl::InitCurl()
}
// enable HTTP ERROR parsing
curl_easy_setopt(this->Curl, CURLOPT_FAILONERROR, 1);
+
+ // if there is little to no activity for too long stop submitting
+ if (this->TimeOutSeconds) {
+ curl_easy_setopt(this->Curl, CURLOPT_LOW_SPEED_LIMIT, 1);
+ curl_easy_setopt(this->Curl, CURLOPT_LOW_SPEED_TIME, this->TimeOutSeconds);
+ }
+
return true;
}
@@ -110,12 +117,7 @@ bool cmCTestCurl::UploadFile(std::string const& local_file,
}
/* enable uploading */
curl_easy_setopt(this->Curl, CURLOPT_UPLOAD, 1);
- // if there is little to no activity for too long stop submitting
- if (this->TimeOutSeconds) {
- ::curl_easy_setopt(this->Curl, CURLOPT_LOW_SPEED_LIMIT, 1);
- ::curl_easy_setopt(this->Curl, CURLOPT_LOW_SPEED_TIME,
- this->TimeOutSeconds);
- }
+
/* HTTP PUT please */
::curl_easy_setopt(this->Curl, CURLOPT_PUT, 1);
::curl_easy_setopt(this->Curl, CURLOPT_VERBOSE, 1);