curl-library
Re: Bugfix: curl_multi_timeout ignores CURLOPT_TIMEOUT
Date: Wed, 13 May 2009 10:18:46 -0500
On Tuesday 12 May 2009 11:59:13 pm Yang Tse wrote:
> 2009/5/13, Luke Dashjr wrote:
> > [...] Is this patch acceptable as-is, or does anyone have any
> > suggestions/needs for revision before it can be merged into the next
> > version of libcurl?
>
> First comments come directly from the compiler. Better first fix all
> errors and warnings...
Whoops, I guess I forgot to test that last-minute safety check. Didn't realize
libcurl was supposed to be C90 conforming either, that's not the default
compile flag for me... Anyhow, here's a revised patch with those issues fixed.
On Wednesday 13 May 2009 05:03:13 am Daniel Stenberg wrote:
> I think the fix need to be done differently and possibly it needs a
> somewhat larger take. I'll elaborate on the timeout logic...
This version of my code (I had an earlier O(n) one that just checked every
easy-handle at curl_multi_timeout call) does use the splay tree. I noticed
that the multi timeouts were only ever 1ms or disabled, so this new function
is run in the cases where it would have been disabled only. Therefore, the 1ms
timeouts always should override the user-defined timeout which only comes into
action when there would be no other timeout set. Or at least that was what I
tried to do-- did I miss something?
Luke
- text/x-patch attachment: libcurl-fix-multi-timeouts.patch