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.
This commit is contained in:
Evan Hunt 2023-01-31 13:30:12 -08:00
parent e90bb121a7
commit dbadc97387

View file

@ -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]);