]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
connect: only start the happy eyeballs timer when needed
authorLoïc Yhuel <loic.yhuel@softathome.com>
Mon, 25 Sep 2023 15:03:40 +0000 (17:03 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 28 Sep 2023 08:21:32 +0000 (10:21 +0200)
The timeout is only used when there is a second address family, for the
delayed eyeballer.

Closes #11939

lib/connect.c

index 41417897189216e1610e6d3d4993d74b4050e9bb..c7ba3e20e32c9aa6c03f84c7758dc57f61a5d240 100644 (file)
@@ -824,11 +824,10 @@ static CURLcode start_connect(struct Curl_cfilter *cf,
     CURL_TRC_CF(data, cf, "created %s (timeout %"
                 CURL_FORMAT_TIMEDIFF_T "ms)",
                 ctx->baller[1]->name, ctx->baller[1]->timeoutms);
+    Curl_expire(data, data->set.happy_eyeballs_timeout,
+                EXPIRE_HAPPY_EYEBALLS);
   }
 
-  Curl_expire(data, data->set.happy_eyeballs_timeout,
-              EXPIRE_HAPPY_EYEBALLS);
-
   return CURLE_OK;
 }