diff options
author | Mathias Schnarrenberger <mathias.schnarrenberger@web.de> | 2021-04-05 14:19:58 +0200 |
---|---|---|
committer | Mathias Schnarrenberger <mathias.schnarrenberger@web.de> | 2021-04-05 14:19:58 +0200 |
commit | 1e96bcafd63f4b3e8586fd389cbb53a66cd52df4 (patch) | |
tree | 53e6da282afbebf8ce59e595fa22f788d021474d | |
parent | ef7ed37e3ebc6f038e13f0157e8c46d1c2df76a8 (diff) |
Fixes https://github.com/reo7sp/tgbot-cpp/issues/13 for curl.
-rw-r--r-- | src/net/CurlHttpClient.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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() { |