1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

properly disconnect failed connections

This commit is contained in:
Daniel Stenberg 2002-09-23 12:44:45 +00:00
parent aef3131e92
commit 35089a4289

View File

@ -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 */