mirror of
https://github.com/moparisthebest/curl
synced 2024-12-23 08:38:49 -05:00
conn: check for connection being dead before reuse
Prevents incorrect reuse of an HTTP connection that has been prematurely
shutdown() by the server.
Partial revert of 755083d00d
Fixes #5884
Closes #5893
This commit is contained in:
parent
8b69ac0c10
commit
728f8d3bdc
@ -1120,6 +1120,12 @@ ConnectionExists(struct Curl_easy *data,
|
||||
/* connect-only or to-be-closed connections will not be reused */
|
||||
continue;
|
||||
|
||||
if(extract_if_dead(check, data)) {
|
||||
/* disconnect it */
|
||||
(void)Curl_disconnect(data, check, /* dead_connection */TRUE);
|
||||
continue;
|
||||
}
|
||||
|
||||
if(bundle->multiuse == BUNDLE_MULTIPLEX)
|
||||
multiplexed = CONN_INUSE(check);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user