aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-06-19 21:32:51 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-06-19 21:32:51 +0000
commitd09b6ecaa5cd3e7639b4354d048459eaa6c4c2b3 (patch)
tree9a36b7d3bad113ef0a48027983ef66e540d74015
parentfb2e71b9bd352bca7e3a5533c69bd236132a5d7a (diff)
- Christopher Palow fixed a curl_multi_socket() issue which previous caused
libcurl to not tell the app properly when a socket was closed (when the name resolve done by c-ares is done) and then immediately re-created and put to use again (for the actual connection). Since the closure will make the "watch status" get lost in several event-based systems libcurl will need to tell the app about this close/re-create case.
-rw-r--r--CHANGES7
-rw-r--r--RELEASE-NOTES3
-rw-r--r--lib/multi.c5
3 files changed, 14 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 1d137577c..b6a311c39 100644
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,13 @@
Changelog
Daniel Stenberg (19 Jun 2008)
+- Christopher Palow fixed a curl_multi_socket() issue which previous caused
+ libcurl to not tell the app properly when a socket was closed (when the name
+ resolve done by c-ares is done) and then immediately re-created and put to
+ use again (for the actual connection). Since the closure will make the
+ "watch status" get lost in several event-based systems libcurl will need to
+ tell the app about this close/re-create case.
+
- Dengminwen found a bug in the connection re-use function when using the
multi interface with pipelining enabled as it would wrongly check for,
detect and close "dead connections" even though that connection was already
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 3201397e2..cf04e5dc8 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -21,6 +21,7 @@ This release includes the following bugfixes:
o Fixed curl-config --ca
o Fixed the multi interface connection re-use with NSS-built libcurl
o connection re-use when using the multi interface with pipelining enabled
+ o curl_multi_socket() socket callback fix for close/re-create sockets case
This release includes the following known bugs:
@@ -38,6 +39,6 @@ This release would not have looked like this without help, code, reports and
advice from friends like these:
Lenny Rachitsky, Axel Tillequin, Arnaud Ebalard, Yang Tse, Dan Fandrich,
- Rob Crittenden, Dengminwen
+ Rob Crittenden, Dengminwen, Christopher Palow
Thanks! (and sorry if I forgot to mention someone)
diff --git a/lib/multi.c b/lib/multi.c
index 3b7831680..f0a7bfb31 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -965,6 +965,11 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
easy->result = Curl_is_resolved(easy->easy_conn, &dns);
if(dns) {
+ /* Update sockets here. Mainly because the socket(s) may have been
+ closed and the application thus needs to be told, even if it is
+ likely that the same socket(s) will again be used further down. */
+ singlesocket(multi, easy);
+
/* Perform the next step in the connection phase, and then move on
to the WAITCONNECT state */
easy->result = Curl_async_resolved(easy->easy_conn,