diff options
author | Daniel Stenberg <daniel@haxx.se> | 2006-12-05 15:17:32 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2006-12-05 15:17:32 +0000 |
commit | 4c65eb0af841d95de24622e1b8212bf1c30c0c48 (patch) | |
tree | 724fc9afad0d238bfe8418da47265f1d6d8d210b /lib/url.c | |
parent | 318a8258fdac1a103eec29878c91850199cfdfd0 (diff) |
CURLOPT_FORBID_REUSE works again with a cleaned up order of doing things in
Curl_done()
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -4150,8 +4150,6 @@ CURLcode Curl_done(struct connectdata **connp, cancelled before we proceed */ ares_cancel(data->state.areschannel); - ConnectionDone(conn); /* the connection is no longer in use */ - /* if data->set.reuse_forbid is TRUE, it means the libcurl client has forced us to close this no matter what we think. @@ -4159,8 +4157,7 @@ CURLcode Curl_done(struct connectdata **connp, closed in spite of all our efforts to be nice, due to protocol restrictions in our or the server's end */ if(data->set.reuse_forbid || conn->bits.close) { - CURLcode res2; - res2 = Curl_disconnect(conn); /* close the connection */ + CURLcode res2 = Curl_disconnect(conn); /* close the connection */ *connp = NULL; /* to make the caller of this function better detect that this was actually killed here */ @@ -4171,6 +4168,8 @@ CURLcode Curl_done(struct connectdata **connp, result = res2; } else { + ConnectionDone(conn); /* the connection is no longer in use */ + /* remember the most recently used connection */ data->state.lastconnect = conn->connectindex; |