mirror of
https://github.com/curl/curl.git
synced 2026-06-16 22:05:37 +03:00
failed transfers will now close the connection
This commit is contained in:
parent
0436bc22f2
commit
29b76a52fb
1 changed files with 5 additions and 0 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue