cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_multi_timeout vs CURLMOPT_TIMERFUNCTION

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 10 Dec 2007 22:13:57 +0100 (CET)

On Sun, 9 Dec 2007, Nathan E. Moore wrote:

> It appears all the line endings got removed. Instead of attaching it again
> here is a link <http://nate.redtetrahedron.org/pycurl/main.cpp> to the same
> code as the original attachment.

Thanks for this, it did help me to figure out where to start looking.

I think I've found the reason for this, and it's simply because the multi
handle code doesn't call the timeout callback with an updated value when
there's no timeout at all left (which is what the -1 timeout from
curl_multi_timeout() basically means), so your application will remain having
the previous timeout set.

I believe I reasoned (when I wrote tis code) that leaving a timeout reported
isn't a lethal sin as it doesn't hurt anyone much to do it this way. To make
it report "no timeout" we probably need to resort to use -1 for that, document
it, add some code for it and make sure to make a note about it in the release
notes since it feels like some existing apps are gonna get confused by it...

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-12-10