]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
asyn-ares: ares_getaddrinfo needs no happy eyeballs timer
authorDaniel Stenberg <daniel@haxx.se>
Tue, 14 Dec 2021 07:31:37 +0000 (08:31 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 14 Dec 2021 14:34:43 +0000 (15:34 +0100)
Closes #8142

lib/asyn-ares.c

index fc168baa6ed9b578feab4a789c32597d87a1a236..fd0bb6c96a250d3ce9ad574051e006b43204bb99 100644 (file)
@@ -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);