Skip to content
Snippets Groups Projects
Commit 35089a42 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

properly disconnect failed connections

parent aef3131e
No related branches found
No related tags found
No related merge requests found
......@@ -339,9 +339,12 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
if(connected)
easy->result = Curl_protocol_connect(easy->easy_conn, NULL);
if(CURLE_OK != easy->result)
if(CURLE_OK != easy->result) {
/* failure detected */
Curl_disconnect(easy->easy_conn); /* close the connection */
easy->easy_conn = NULL; /* no more connection */
break;
}
if(connected) {
/* after the connect has completed, go DO */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment