aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-10-22 06:34:14 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-10-22 06:34:14 +0000
commit29b76a52fb1a88655efa7b2b493e3660f7e540b9 (patch)
tree995164ff192dd4b4d2c6b70e197cb2aa9e392c64 /lib
parent0436bc22f2d7ce8740539f109585a4ed51ba3669 (diff)
failed transfers will now close the connection
Diffstat (limited to 'lib')
-rw-r--r--lib/transfer.c5
1 files changed, 5 insertions, 0 deletions
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 */