From dbadc97387a466c970e54c2801c02cca51887f93 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Tue, 31 Jan 2023 13:30:12 -0800 Subject: [PATCH] on connect error, send the actual result to the caller formerly if a connection failed in dns_request, the callback function was called with ISC_R_CANCELED. change this to the actual result code so the failure is correctly reported. --- lib/dns/request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dns/request.c b/lib/dns/request.c index e3bef774b5..f78a57d7a3 100644 --- a/lib/dns/request.c +++ b/lib/dns/request.c @@ -921,7 +921,7 @@ req_connected(isc_result_t eresult, isc_region_t *region, void *arg) { req_send(request); } else { request_cancel(request); - req_sendevent(request, ISC_R_CANCELED); + req_sendevent(request, eresult); } UNLOCK(&request->requestmgr->locks[request->hash]);