From: Daniel Stenberg Date: Mon, 10 Mar 2025 11:02:58 +0000 (+0100) Subject: hostip: don't use alarm() for DoH resolves X-Git-Tag: curl-8_13_0~192 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75acda70aaebe7f92acc39a413e6ab8471622888;p=thirdparty%2Fcurl.git 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 --- diff --git a/lib/hostip.c b/lib/hostip.c index e335ca0fc7..d92999a650 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -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) {