]> granicus.if.org Git - curl/commitdiff
CURLOPT_FORBID_REUSE works again with a cleaned up order of doing things in
authorDaniel Stenberg <daniel@haxx.se>
Tue, 5 Dec 2006 15:17:32 +0000 (15:17 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 5 Dec 2006 15:17:32 +0000 (15:17 +0000)
Curl_done()

CHANGES
RELEASE-NOTES
lib/url.c

diff --git a/CHANGES b/CHANGES
index 55288a34b9294722c8502f73a0da6878cc48d605..6352a14d773df0860ff0982bcc97034b243a8e0d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,9 @@
                                   Changelog
 
 Daniel (5 December 2006)
+- Sh Diao reported that CURLOPT_FORBID_REUSE no works, and indeed it broke in
+  the 7.16.0 release.
+
 - Martin Skinner brought back bug report #1230118 to haunt us once again.
   (http://curl.haxx.se/bug/view.cgi?id=1230118) curl_getdate() did not work
   properly for all input dates on Windows. It was mostly seen on some TZ time
index 99ef62c0862e8b73899daf3c0e6cef5fc2ee8761..ff47e8f38f49d9128e2a95f4baaad831cf64db9f 100644 (file)
@@ -29,6 +29,7 @@ This release includes the following bugfixes:
  o CPU 100% load when HTTP upload connection broke
  o active FTP didn't work with multi interface
  o curl_getdate() could be off one hour for TZ time zones with DST, on windows
+ o CURLOPT_FORBID_REUSE works again
 
 Other curl-related news:
 
@@ -46,6 +47,6 @@ advice from friends like these:
 
  James Housley, Olaf Stueben, Yang Tse, Gisle Vanem, Bradford Bruce,
  Ciprian Badescu, Dmitriy Sergeyev, Nir Soffer, Venkat Akella, Toon Verwaest,
- Matt Witherspoon, Alexey Simak, Martin Skinner
+ Matt Witherspoon, Alexey Simak, Martin Skinner, Sh Diao
 
         Thanks! (and sorry if I forgot to mention someone)
index bf67b9c1b13545e6a50965eec5a2fe471ea95890..71463164adcea88259cd7685899c126d759a7918 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -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;