aboutsummaryrefslogtreecommitdiff
path: root/lib/multi.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-09-23 12:44:45 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-09-23 12:44:45 +0000
commit35089a4289747bb4b15f00cf602d28fa3c913fdf (patch)
tree966021e8a012f9f6278a5a3ddae6e7c180f7509e /lib/multi.c
parentaef3131e92817285024a38b9669fec1f64a3088d (diff)
properly disconnect failed connections
Diffstat (limited to 'lib/multi.c')
-rw-r--r--lib/multi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 21ed99c74..f97345a6f 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -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 */