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().
This commit is contained in:
Daniel Stenberg
2006-08-25 13:53:20 +00:00
parent da48a6ba87
commit 2ff609dd43
3 changed files with 12 additions and 1 deletions

View File

@@ -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