From 18f04faef9d5a7f8e1a73fe33a51f7b001e34741 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 24 Mar 2025 10:13:44 +0100 Subject: [PATCH] asyn-thread: minor cleanups - Use 'td->' in more places instead of the full thing. - Remove an assert that is always true since the extra dynamic malloc was removed - Ignore Curl_ares_perform() errors to prioritize the "real" resolver info and leave RR as "less important" Closes #16808 --- lib/asyn-thread.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c index 772b8ccabf..c3edf72033 100644 --- a/lib/asyn-thread.c +++ b/lib/asyn-thread.c @@ -366,9 +366,9 @@ static void destroy_async_data(struct Curl_easy *data) #endif #ifdef USE_HTTPSRR_ARES - if(data->state.async.thdata.channel) { - ares_destroy(data->state.async.thdata.channel); - data->state.async.thdata.channel = NULL; + if(td->channel) { + ares_destroy(td->channel); + td->channel = NULL; } #endif /* @@ -567,13 +567,8 @@ CURLcode Curl_resolver_is_resolved(struct Curl_easy *data, DEBUGASSERT(entry); *entry = NULL; - if(!td) { - DEBUGASSERT(td); - return CURLE_COULDNT_RESOLVE_HOST; - } #ifdef USE_HTTPSRR_ARES - if(Curl_ares_perform(data->state.async.thdata.channel, 0) < 0) - return CURLE_UNRECOVERABLE_POLL; + (void)Curl_ares_perform(td->channel, 0); /* ignore errors */ #endif Curl_mutex_acquire(&td->tsd.mutx); -- 2.47.3