add timeout to curl

This commit is contained in:
quaK 2023-05-30 21:11:30 +03:00
parent a3a290534c
commit 6150f2d45c

View File

@ -77,6 +77,8 @@ namespace utils::http
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 2);
if (!fields.empty())
{
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, fields.data());