]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
conn: always set bits.close with connclose()
authorDaniel Stenberg <daniel@haxx.se>
Mon, 9 Dec 2019 11:03:05 +0000 (12:03 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 9 Dec 2019 16:17:42 +0000 (17:17 +0100)
Closes #4690

lib/http_proxy.c
lib/multi.c

index f095455a518210ee2e5fde128199d6f4e74c3f12..75c7a60c35fffe1325f39571592c8139ebb5aa52 100644 (file)
@@ -58,8 +58,9 @@ static CURLcode https_proxy_connect(struct connectdata *conn, int sockindex)
       Curl_ssl_connect_nonblocking(conn, sockindex,
                                    &conn->bits.proxy_ssl_connected[sockindex]);
     if(result)
-      conn->bits.close = TRUE; /* a failed connection is marked for closure to
-                                  prevent (bad) re-use or similar */
+      /* a failed connection is marked for closure to prevent (bad) re-use or
+         similar */
+      connclose(conn, "TLS handshake failed");
   }
   return result;
 #else
index 1fa6b092b548ca530d296166e95f3bd3c438d2b8..cc11ea61768ab5d61f13266c9321f73e6ccda94f 100755 (executable)
@@ -639,7 +639,7 @@ static CURLcode multi_done(struct Curl_easy *data,
      ) || conn->bits.close
        || (premature && !(conn->handler->flags & PROTOPT_STREAM))) {
     CURLcode res2;
-    conn->bits.close = TRUE; /* forcibly prevents reuse */
+    connclose(conn, "disconnecting");
     CONN_UNLOCK(data);
     res2 = Curl_disconnect(data, conn, premature);