curl-library
Re: running_handles: less than zero ?
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 5 Oct 2006 11:02:03 +0200 (CEST)
Date: Thu, 5 Oct 2006 11:02:03 +0200 (CEST)
On Thu, 5 Oct 2006, Jeff Pohlmeyer wrote:
> * STATE: COMPLETED => COMPLETED handle 0x84dc724; (connection #-1)
...
> if(state == CURLM_STATE_COMPLETED)
> easy->easy_handle->multi->num_alive--;
> For the case where the previous state was already CURLM_STATE_COMPLETED,
> should num_alive still get decreased?
No, that's just plain wrong. 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?
Good catch!
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2006-10-05