multi: don't expire timeouts at disonnect or done
The functions Curl_disconnect() and Curl_done() are both used within the scope of a single request so they cannot be allowed to use Curl_expire(... 0) to kill all timeouts as there are some timeouts that are set before a request that are supposed to remain until the request is done. The timeouts are now instead cleared at curl_easy_cleanup() and when the multi state machine changes a handle to the complete state.
This commit is contained in:
@@ -1594,6 +1594,8 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
|
||||
/* Important: reset the conn pointer so that we don't point to memory
|
||||
that could be freed anytime */
|
||||
easy->easy_conn = NULL;
|
||||
|
||||
Curl_expire(data, 0); /* stop all timers */
|
||||
break;
|
||||
|
||||
case CURLM_STATE_MSGSENT:
|
||||
|
||||
Reference in New Issue
Block a user