From 2ebbb58493ab0f7b992a3df0660d8c05d96e61df Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Thu, 14 May 2015 15:27:31 -0700 Subject: [PATCH] Set cURL connect timeout to 30 seconds (300 is too long) --- legacy/project/src/common/CURL.cpp | 1 + lime/net/URLLoader.hx | 1 + 2 files changed, 2 insertions(+) diff --git a/legacy/project/src/common/CURL.cpp b/legacy/project/src/common/CURL.cpp index fd18315f8..a6fc65d75 100644 --- a/legacy/project/src/common/CURL.cpp +++ b/legacy/project/src/common/CURL.cpp @@ -75,6 +75,7 @@ public: curl_easy_setopt(mHandle, CURLOPT_HEADERDATA, (void *)this); curl_easy_setopt(mHandle, CURLOPT_NOPROGRESS, 0); + curl_easy_setopt(mHandle, CURLOPT_CONNECTTIMEOUT, 30); if (r.followRedirects) curl_easy_setopt(mHandle, CURLOPT_FOLLOWLOCATION, 1); diff --git a/lime/net/URLLoader.hx b/lime/net/URLLoader.hx index 5822c0c7b..3794e11a9 100644 --- a/lime/net/URLLoader.hx +++ b/lime/net/URLLoader.hx @@ -336,6 +336,7 @@ class URLLoader { CURLEasy.setopt(__curl, SSL_VERIFYPEER, false); CURLEasy.setopt(__curl, SSL_VERIFYHOST, false); CURLEasy.setopt(__curl, USERAGENT, "libcurl-agent/1.0"); + CURLEasy.setopt(__curl, CONNECTTIMEOUT, 30); var result = CURLEasy.perform(__curl);