From 1e96bcafd63f4b3e8586fd389cbb53a66cd52df4 Mon Sep 17 00:00:00 2001 From: Mathias Schnarrenberger Date: Mon, 5 Apr 2021 14:19:58 +0200 Subject: Fixes https://github.com/reo7sp/tgbot-cpp/issues/13 for curl. --- src/net/CurlHttpClient.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/net') diff --git a/src/net/CurlHttpClient.cpp b/src/net/CurlHttpClient.cpp index 6dc43f8..13973cc 100644 --- a/src/net/CurlHttpClient.cpp +++ b/src/net/CurlHttpClient.cpp @@ -11,6 +11,9 @@ namespace TgBot { CurlHttpClient::CurlHttpClient() : _httpParser() { curlSettings = curl_easy_init(); + + curl_easy_setopt(curlSettings, CURLOPT_CONNECTTIMEOUT, 20); + curl_easy_setopt(curlSettings, CURLOPT_TIMEOUT, 25); } CurlHttpClient::~CurlHttpClient() { -- cgit v1.2.3