]> granicus.if.org Git - curl/commitdiff
failed transfers will now close the connection
authorDaniel Stenberg <daniel@haxx.se>
Mon, 22 Oct 2001 06:34:14 +0000 (06:34 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 22 Oct 2001 06:34:14 +0000 (06:34 +0000)
lib/transfer.c

index 3cdfa4d7a312a22ca6c9252a453bdf80ce7ed1ab..5035c30379a380519ae37cbb9be1e2fb5ce187c2 100644 (file)
@@ -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 */