- curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 1L); //seconds timeout for a connection
- curl_easy_setopt(curl, CURLOPT_TIMEOUT, 1L); //seconds timeout for an operation
- curl_easy_setopt(curl, CURLOPT_FRESH_CONNECT, 1L);
+ curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, (long)curl_connect_timeout); //seconds timeout for a connection
+ curl_easy_setopt(curl, CURLOPT_TIMEOUT, (long)curl_operation_timeout); //seconds timeout for an operation
+ curl_easy_setopt(curl, CURLOPT_FRESH_CONNECT, (long)curl_connect_timeout);