summaryrefslogtreecommitdiff
path: root/lib/multi.c
diff options
context:
space:
mode:
authorKamil Dudka <kdudka@redhat.com>2010-11-19 13:43:20 +0100
committerKamil Dudka <kdudka@redhat.com>2010-12-06 14:35:42 +0100
commit5c7c9a768d009319520142fcaee1dea33625060f (patch)
treea8c31c739426e32edb76d9b86be951d9cb1191da /lib/multi.c
parentbf1c102b80698e60972063b269f61ccbe2bfeaa8 (diff)
downloadcurl-5c7c9a768d009319520142fcaee1dea33625060f.tar.gz
url: provide dead_connection flag in Curl_handler::disconnect
It helps to prevent a hangup with some FTP servers in case idle session timeout has exceeded. But it may be useful also for other protocols that send any quit message on disconnect. Currently used by FTP, POP3, IMAP and SMTP.
Diffstat (limited to 'lib/multi.c')
-rw-r--r--lib/multi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/multi.c b/lib/multi.c
index b57724e62..7be479bd4 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -1634,7 +1634,8 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
}
if(disconnect_conn) {
- Curl_disconnect(easy->easy_conn); /* disconnect properly */
+ /* disconnect properly */
+ Curl_disconnect(easy->easy_conn, /* dead_connection */ FALSE);
/* This is where we make sure that the easy_conn pointer is reset.
We don't have to do this in every case block above where a
@@ -1759,7 +1760,7 @@ CURLMcode curl_multi_cleanup(CURLM *multi_handle)
for(i=0; i< multi->connc->num; i++) {
if(multi->connc->connects[i] &&
multi->connc->connects[i]->protocol & PROT_CLOSEACTION) {
- Curl_disconnect(multi->connc->connects[i]);
+ Curl_disconnect(multi->connc->connects[i], /* dead_connection */ FALSE);
multi->connc->connects[i] = NULL;
}
}
@@ -2665,7 +2666,7 @@ static void multi_connc_remove_handle(struct Curl_multi *multi,
data->state.shared_conn = multi;
else {
/* out of memory - so much for graceful shutdown */
- Curl_disconnect(conn);
+ Curl_disconnect(conn, /* dead_connection */ FALSE);
multi->connc->connects[i] = NULL;
}
}