From d09b6ecaa5cd3e7639b4354d048459eaa6c4c2b3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 19 Jun 2008 21:32:51 +0000 Subject: - 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. --- lib/multi.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') 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, -- cgit v1.2.3