mirror of https://github.com/cppla/ServerStatus
add timeout for libcurl
parent
022e5edb28
commit
2703993272
|
@ -345,6 +345,8 @@ void CMain::WatchdogMessage(int ClientNetID, double load_1, double load_5, doubl
|
|||
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, urlBuffer);
|
||||
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 3L);
|
||||
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 6L);
|
||||
res = curl_easy_perform(curl);
|
||||
if(res != CURLE_OK)
|
||||
fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res));
|
||||
|
|
Loading…
Reference in New Issue