Set cURL connect timeout to 30 seconds (300 is too long)

This commit is contained in:
Joshua Granick
2015-05-14 15:27:31 -07:00
parent c2e09186e9
commit 2ebbb58493
2 changed files with 2 additions and 0 deletions

View File

@@ -75,6 +75,7 @@ public:
curl_easy_setopt(mHandle, CURLOPT_HEADERDATA, (void *)this); curl_easy_setopt(mHandle, CURLOPT_HEADERDATA, (void *)this);
curl_easy_setopt(mHandle, CURLOPT_NOPROGRESS, 0); curl_easy_setopt(mHandle, CURLOPT_NOPROGRESS, 0);
curl_easy_setopt(mHandle, CURLOPT_CONNECTTIMEOUT, 30);
if (r.followRedirects) if (r.followRedirects)
curl_easy_setopt(mHandle, CURLOPT_FOLLOWLOCATION, 1); curl_easy_setopt(mHandle, CURLOPT_FOLLOWLOCATION, 1);

View File

@@ -336,6 +336,7 @@ class URLLoader {
CURLEasy.setopt(__curl, SSL_VERIFYPEER, false); CURLEasy.setopt(__curl, SSL_VERIFYPEER, false);
CURLEasy.setopt(__curl, SSL_VERIFYHOST, false); CURLEasy.setopt(__curl, SSL_VERIFYHOST, false);
CURLEasy.setopt(__curl, USERAGENT, "libcurl-agent/1.0"); CURLEasy.setopt(__curl, USERAGENT, "libcurl-agent/1.0");
CURLEasy.setopt(__curl, CONNECTTIMEOUT, 30);
var result = CURLEasy.perform(__curl); var result = CURLEasy.perform(__curl);