From: Mark Andrews Date: Mon, 4 Dec 2023 02:21:20 +0000 (+1100) Subject: Handle ISC_R_SHUTTINGDOWN in dighost.c:recv_done X-Git-Tag: v9.19.19~16^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=69f7048c89aada4fdac292d588ea1571a47adfcb;p=thirdparty%2Fbind9.git Handle ISC_R_SHUTTINGDOWN in dighost.c:recv_done When dighost.c:recv_done is called with ISC_R_SHUTTINGDOWN cancel all outstanding lookups as this indicates SIGTERM was recieved. --- diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index 0dd7b3a8258..17c4e388d5c 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -3910,7 +3910,9 @@ recv_done(isc_nmhandle_t *handle, isc_result_t eresult, isc_region_t *region, { debug("recv_done: cancel"); isc_nmhandle_detach(&query->readhandle); - if (!query->canceled) { + if (eresult == ISC_R_SHUTTINGDOWN) { + cancel_all(); + } else if (!query->canceled) { cancel_lookup(l); } query_detach(&query);