From 29b76a52fb1a88655efa7b2b493e3660f7e540b9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 22 Oct 2001 06:34:14 +0000 Subject: failed transfers will now close the connection --- lib/transfer.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/transfer.c') diff --git a/lib/transfer.c b/lib/transfer.c index 3cdfa4d7a..5035c3037 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -939,6 +939,11 @@ CURLcode Curl_perform(struct SessionHandle *data) * may be free()ed in the Curl_done() function. */ newurl = conn->newurl?strdup(conn->newurl):NULL; + else + /* The transfer phase returned error, we mark the connection to get + * closed to prevent being re-used. This is becasue we can't + * possibly know if the connection is in a good shape or not now. */ + conn->bits.close = TRUE; /* Always run Curl_done(), even if some of the previous calls failed, but return the previous (original) error code */ -- cgit v1.2.3