From: Daniel Stenberg Date: Mon, 22 Oct 2001 06:34:14 +0000 (+0000) Subject: failed transfers will now close the connection X-Git-Tag: curl-7_9_1~68 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=29b76a52fb1a88655efa7b2b493e3660f7e540b9;p=thirdparty%2Fcurl.git failed transfers will now close the connection --- diff --git a/lib/transfer.c b/lib/transfer.c index 3cdfa4d7a3..5035c30379 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 */