1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-16 06:25:03 -05:00

Curl_disconnect: treat all CONNECT_ONLY connections as "dead"

Since the connection has been used by the "outside" we don't know the
state of it anymore and curl should not use it anymore.

Bug: https://curl.haxx.se/mail/lib-2019-04/0052.html

Closes #3795
This commit is contained in:
Daniel Stenberg 2019-04-19 16:58:27 +02:00
parent 31c3111284
commit e06b8bdae6
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -809,6 +809,10 @@ CURLcode Curl_disconnect(struct Curl_easy *data,
for the connection! */ for the connection! */
conn->data = data; conn->data = data;
if(conn->bits.connect_only)
/* treat the connection as dead in CONNECT_ONLY situations */
dead_connection = TRUE;
if(conn->handler->disconnect) if(conn->handler->disconnect)
/* This is set if protocol-specific cleanups should be made */ /* This is set if protocol-specific cleanups should be made */
conn->handler->disconnect(conn, dead_connection); conn->handler->disconnect(conn, dead_connection);