浏览代码

Add curl timeout options to the SubmitUsingHTTP method. They were only in the SubmitUsingFTP method.

David Cole 16 年之前
父节点
当前提交
d741a6a57f
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. 7 2
      Source/CTest/cmCTestSubmitHandler.cxx

+ 7 - 2
Source/CTest/cmCTestSubmitHandler.cxx

@@ -125,10 +125,11 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const cmStdString& localprefix,
 
       // enable uploading
       ::curl_easy_setopt(curl, CURLOPT_UPLOAD, 1) ;
-      // if there is little to no activity for 30 seconds stop submitting
+
+      // 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_UPLOAD, 1) ;
 
       cmStdString local_file = *file;
@@ -314,6 +315,10 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const cmStdString& localprefix,
       /* enable uploading */
       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) ;
+
       /* HTTP PUT please */
       ::curl_easy_setopt(curl, CURLOPT_PUT, 1);
       ::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);