← Commit list

05fbe85e62

Stefan Eissing
Stefan Eissing
2025-10-10
SUCCESS Duration: 158s

Subject

c-ares: when resolving failed, persist error

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/asyn-ares.c+8 -3
@@ -302,11 +302,13 @@ CURLcode Curl_async_is_resolved(struct Curl_easy *data,
if(data->state.async.done) {
*dns = data->state.async.dns;
- return CURLE_OK;
+ return ares->result;
}
- if(Curl_ares_perform(ares->channel, 0) < 0)
- return CURLE_UNRECOVERABLE_POLL;
+ if(Curl_ares_perform(ares->channel, 0) < 0) {
+ result = CURLE_UNRECOVERABLE_POLL;
+ goto out;
+ }
#ifndef HAVE_CARES_GETADDRINFO
/* Now that we have checked for any last minute results above, see if there
@@ -371,6 +373,9 @@ CURLcode Curl_async_is_resolved(struct Curl_easy *data,
result, *dns ? "" : "not ");
async_ares_cleanup(data);
}
+
+out:
+ ares->result = result;
return result;
}