diff options
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -788,8 +788,11 @@ CURLcode Curl_disconnect(struct Curl_easy *data, /* This is set if protocol-specific cleanups should be made */ conn->handler->disconnect(conn, dead_connection); - /* unlink ourselves! */ infof(data, "Closing connection %ld\n", conn->connection_id); + Curl_ssl_close(conn, FIRSTSOCKET); + Curl_ssl_close(conn, SECONDARYSOCKET); + + /* unlink ourselves! */ Curl_conncache_remove_conn(data, conn, TRUE); free_idnconverted_hostname(&conn->host); @@ -797,10 +800,6 @@ CURLcode Curl_disconnect(struct Curl_easy *data, free_idnconverted_hostname(&conn->http_proxy.host); free_idnconverted_hostname(&conn->socks_proxy.host); - /* this assumes that the pointer is still there after the connection was - detected from the cache */ - Curl_ssl_close(conn, FIRSTSOCKET); - conn_free(conn); return CURLE_OK; } |