connect: only start the happy eyeballs timer when needed

The timeout is only used when there is a second address family, for the
delayed eyeballer.

Closes #11939
This commit is contained in:
Loïc Yhuel 2023-09-25 17:03:40 +02:00 committed by Daniel Stenberg
parent a35e2dd69c
commit b5bb84cbef
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View 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;
}