Skip to content

Commit e06b8bd

Browse files
committed
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
1 parent 31c3111 commit e06b8bd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/url.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,10 @@ CURLcode Curl_disconnect(struct Curl_easy *data,
809809
for the connection! */
810810
conn->data = data;
811811

812+
if(conn->bits.connect_only)
813+
/* treat the connection as dead in CONNECT_ONLY situations */
814+
dead_connection = TRUE;
815+
812816
if(conn->handler->disconnect)
813817
/* This is set if protocol-specific cleanups should be made */
814818
conn->handler->disconnect(conn, dead_connection);

0 commit comments

Comments
 (0)