mirror of
https://github.com//cppla/ServerStatus
synced 2025-06-02 13:49:49 +08:00
add timeout for libcurl
This commit is contained in:
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…
x
Reference in New Issue
Block a user