cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Timeouts and using CURLOPT_FRESH_CONNECT

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 27 Nov 2003 21:23:16 +0100 (CET)

On Thu, 27 Nov 2003, Andrew Fuller wrote:

> Just tried it on curl-7.11.0-20031127 and it worked fine - ie you can see
> where curl explicitly closes the connection upon timeout - see attached
> output.
>
> Thanks Daniel!

Ah, neat! Thanks for verifying this.

> Until this is released, I'll set CURLOPT_FRESH_CONNECT on a handle whose
> fetch times out. Does this affect only the next fetch on that handle, or
> should I subsequently clear CURLOPT_FRESH_CONNECT?

The option is "sticky" (all options are) so you need to explicitly clear it.

However, if you then try a URL from that first host again you might re-use
that connection again... You'll get a tricky decision to figure out if you
risk doing that or not.

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
 [[ Do not post private mails to this email address. They won't reach me. ]]
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
Received on 2003-11-27