From e880da5cf950c299bbe2d5b6d245cac8b8f3fc11 Mon Sep 17 00:00:00 2001 From: Tixx <83774803+WiserTixx@users.noreply.github.com> Date: Wed, 25 Dec 2024 00:54:19 +0100 Subject: [PATCH 1/2] Up curl connection timeout to 2 minutes --- src/Network/Http.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Network/Http.cpp b/src/Network/Http.cpp index eef2143..c3932fd 100644 --- a/src/Network/Http.cpp +++ b/src/Network/Http.cpp @@ -104,7 +104,7 @@ std::string HTTP::Post(const std::string& IP, const std::string& Fields) { struct curl_slist* list = nullptr; list = curl_slist_append(list, "Content-Type: application/json"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, list); - curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 10); // seconds + curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 120); // seconds curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); res = curl_easy_perform(curl); curl_slist_free_all(list); From e53885a8a87dea7b560acba4f60e3c72fabd5061 Mon Sep 17 00:00:00 2001 From: Tixx <83774803+WiserTixx@users.noreply.github.com> Date: Sat, 11 Jan 2025 21:45:06 +0100 Subject: [PATCH 2/2] Raise http get timeout to 2 minutes --- src/Network/Http.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Network/Http.cpp b/src/Network/Http.cpp index c3932fd..2804dd7 100644 --- a/src/Network/Http.cpp +++ b/src/Network/Http.cpp @@ -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_WRITEFUNCTION, CurlWriteCallback); 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); res = curl_easy_perform(curl); if (res != CURLE_OK) {