From 2ff609dd43cb5c1c0da893c080132a48a2d4c73b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 25 Aug 2006 13:53:20 +0000 Subject: Armel Asselin reported that the 'running_handles' counter wasn't updated properly if you removed a "live" handle from a multi handle with curl_multi_remove_handle(). --- lib/multi.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/multi.c b/lib/multi.c index d822bda52..c1ff12e29 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -386,6 +386,10 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle, if(easy) { /* If the 'state' is not INIT or COMPLETED, we might need to do something nice to put the easy_handle in a good known state when this returns. */ + if(easy->state != CURLM_STATE_COMPLETED) + /* this handle is "alive" so we need to count down the total number of + alive connections when this is removed */ + multi->num_alive--; /* The timer must be shut down before easy->multi is set to NULL, else the timenode will remain in the splay tree after -- cgit v1.2.3