curl-library
Re: running_handles: less than zero ?
Date: Thu, 5 Oct 2006 06:44:47 -0500
> If you change that line to only decrease the counter with:
> if((oldstate != state) && (state == CURLM_STATE_COMPLETED))
> ... does it seem to do fine then?
Yes, that seems to solve the "below-zero" problem, but it
still seems like there is something weird going on.
Sometimes the app just seems to stall, and the CURLOPT_*
timeout settings don't have any effect. Whenever it gets
in this state, libevent's event loop eats up 100% CPU.
Oddly, stuffing another URL into the fifo usually kicks the
app back into gear.
I am also sometimes getting handles that show COMPLETED in
multistate, but aren't getting picked up as CURLMSG_DONE
in my curl_multi_info_read() loop.
Attached is a patch for "hiperfifo.c" with some added timeouts
and counters, that might help show what I'm seeing.
Thanks,
- Jeff
- text/x-patch attachment: hiperfifo.patch