From 75acda70aaebe7f92acc39a413e6ab8471622888 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 10 Mar 2025 12:02:58 +0100 Subject: [PATCH] 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 --- lib/hostip.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) { -- 2.47.3