1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

- 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.
This commit is contained in:
Daniel Stenberg 2008-06-19 21:32:51 +00:00
parent fb2e71b9bd
commit d09b6ecaa5
3 changed files with 14 additions and 1 deletions

View File

@ -7,6 +7,13 @@
Changelog Changelog
Daniel Stenberg (19 Jun 2008) 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 - Dengminwen found a bug in the connection re-use function when using the
multi interface with pipelining enabled as it would wrongly check for, multi interface with pipelining enabled as it would wrongly check for,
detect and close "dead connections" even though that connection was already detect and close "dead connections" even though that connection was already

View File

@ -21,6 +21,7 @@ This release includes the following bugfixes:
o Fixed curl-config --ca o Fixed curl-config --ca
o Fixed the multi interface connection re-use with NSS-built libcurl 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 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: 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: advice from friends like these:
Lenny Rachitsky, Axel Tillequin, Arnaud Ebalard, Yang Tse, Dan Fandrich, 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) Thanks! (and sorry if I forgot to mention someone)

View File

@ -965,6 +965,11 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
easy->result = Curl_is_resolved(easy->easy_conn, &dns); easy->result = Curl_is_resolved(easy->easy_conn, &dns);
if(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 /* Perform the next step in the connection phase, and then move on
to the WAITCONNECT state */ to the WAITCONNECT state */
easy->result = Curl_async_resolved(easy->easy_conn, easy->result = Curl_async_resolved(easy->easy_conn,