diff options
author | Daniel Stenberg <daniel@haxx.se> | 2006-08-25 13:53:20 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2006-08-25 13:53:20 +0000 |
commit | 2ff609dd43cb5c1c0da893c080132a48a2d4c73b (patch) | |
tree | c93c102708f2c0b25a1cbf6c3bd193b211ccfeeb /lib | |
parent | da48a6ba87f76f64287bb14bcae37b1aa00a0a0a (diff) |
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().
Diffstat (limited to 'lib')
-rw-r--r-- | lib/multi.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 |