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);