cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl timeout issues

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Tue, 29 Jun 2010 14:29:13 +0200

On Tuesday 29 of June 2010 12:18:52 Paul Ridgway wrote:
> std::cout << "Set Timeout: " << timeout_ << std::endl;
> curl_easy_setopt(curl, CURLOPT_TIMEOUT, &timeout_);
> curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT,
> &contimeout_);

The problem is in the two lines above. You pass a pointer to libcurl,
instead of long, as required by libcurl API:

http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTTIMEOUT

Kamil
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-06-29