mirror of
https://github.com/curl/curl.git
synced 2025-09-16 17:12:43 +03:00
multi: call detach_connection before Curl_disconnect
Curl_disconnect bails out if conn->easyq is not empty, detach_connection needs to be called first to remove the current easy from the queue. Fixes #4144 Closes #4151
This commit is contained in:
parent
cdf7d13bcb
commit
a55edcea65
|
@ -2012,13 +2012,15 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
|
||||||
if(stream_error) {
|
if(stream_error) {
|
||||||
/* Don't attempt to send data over a connection that timed out */
|
/* Don't attempt to send data over a connection that timed out */
|
||||||
bool dead_connection = result == CURLE_OPERATION_TIMEDOUT;
|
bool dead_connection = result == CURLE_OPERATION_TIMEDOUT;
|
||||||
/* disconnect properly */
|
struct connectdata *conn = data->conn;
|
||||||
Curl_disconnect(data, data->conn, dead_connection);
|
|
||||||
|
|
||||||
/* This is where we make sure that the conn pointer is reset.
|
/* This is where we make sure that the conn pointer is reset.
|
||||||
We don't have to do this in every case block above where a
|
We don't have to do this in every case block above where a
|
||||||
failure is detected */
|
failure is detected */
|
||||||
detach_connnection(data);
|
detach_connnection(data);
|
||||||
|
|
||||||
|
/* disconnect properly */
|
||||||
|
Curl_disconnect(data, conn, dead_connection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(data->mstate == CURLM_STATE_CONNECT) {
|
else if(data->mstate == CURLM_STATE_CONNECT) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user