diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-12-14 08:31:37 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-12-14 08:31:37 +0100 |
commit | eb1e7c2507a71ec1a1f10fa4f497f43ed80478be (patch) | |
tree | 115b46e74b01e7c890558a3a0d1eeb58585fff6b | |
parent | 2300ad26d374721fd01a69a3d7d8ed384f581462 (diff) | |
download | curl-bagder/cares-happy-eyeballs.tar.gz |
asyn-ares: ares_getaddrinfo needs to happy eyeballs timerbagder/cares-happy-eyeballs
-rw-r--r-- | lib/asyn-ares.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c index fc168baa6..fd0bb6c96 100644 --- a/lib/asyn-ares.c +++ b/lib/asyn-ares.c @@ -109,7 +109,9 @@ struct thread_data { struct Curl_addrinfo *temp_ai; /* intermediary result while fetching c-ares parts */ int last_status; +#ifndef HAVE_CARES_GETADDRINFO struct curltime happy_eyeballs_dns_time; /* when this timer started, or 0 */ +#endif }; /* How long we are willing to wait for additional parallel responses after @@ -375,6 +377,7 @@ CURLcode Curl_resolver_is_resolved(struct Curl_easy *data, waitperform(data, 0); +#ifndef HAVE_CARES_GETADDRINFO /* Now that we've checked for any last minute results above, see if there are any responses still pending when the EXPIRE_HAPPY_EYEBALLS_DNS timer expires. */ @@ -397,6 +400,7 @@ CURLcode Curl_resolver_is_resolved(struct Curl_easy *data, ares_cancel((ares_channel)data->state.async.resolver); DEBUGASSERT(res->num_pending == 0); } +#endif if(res && !res->num_pending) { (void)Curl_addrinfo_callback(data, res->last_status, res->temp_ai); |