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
for the connection! */
conn->data = data;
+ if(conn->bits.connect_only)
+ /* treat the connection as dead in CONNECT_ONLY situations */
+ dead_connection = TRUE;
+
if(conn->handler->disconnect)
/* This is set if protocol-specific cleanups should be made */
conn->handler->disconnect(conn, dead_connection);