hostip: don't use alarm() for DoH resolves

When built to use the synch resolver and DoH is used for a transfer, do
not use alarm() for timeout since DoH resolving is not blocking.

Closes #16649
This commit is contained in:
Daniel Stenberg 2025-03-10 12:02:58 +01:00
parent 3c2948e0a6
commit 75acda70aa
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -932,8 +932,9 @@ enum resolve_t Curl_resolv_timeout(struct Curl_easy *data,
else
timeout = (timeoutms > LONG_MAX) ? LONG_MAX : (long)timeoutms;
if(!timeout)
/* USE_ALARM_TIMEOUT defined, but no timeout actually requested */
if(!timeout || data->set.doh)
/* USE_ALARM_TIMEOUT defined, but no timeout actually requested or resolve
done using DoH */
return Curl_resolv(data, hostname, port, TRUE, entry);
if(timeout < 1000) {