Raise http get timeout to 2 minutes

This commit is contained in:
Tixx 2025-01-11 21:45:06 +01:00
parent e880da5cf9
commit e53885a8a8
No known key found for this signature in database
GPG Key ID: EC6E7A2BAABF0B8C

View File

@ -76,7 +76,7 @@ std::string HTTP::Get(const std::string& IP) {
curl_easy_setopt(curl, CURLOPT_URL, IP.c_str()); curl_easy_setopt(curl, CURLOPT_URL, IP.c_str());
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, CurlWriteCallback); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, CurlWriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void*)&Ret); curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void*)&Ret);
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 10); // seconds curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 120); // seconds
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
res = curl_easy_perform(curl); res = curl_easy_perform(curl);
if (res != CURLE_OK) { if (res != CURLE_OK) {