cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: running_handles: less than zero ?

From: Daniel Stenberg <daniel_at_haxx.se>
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.html
Received on 2006-10-05

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET