From: Mark Andrews Date: Thu, 7 Dec 2023 02:36:46 +0000 (+1100) Subject: Handle ISC_R_SHUTTINGDOWN in dighost.c:tcp_connected X-Git-Tag: v9.19.21~36^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ae24792ea2858517a3ed50ac247ab59c84cd81f2;p=thirdparty%2Fbind9.git Handle ISC_R_SHUTTINGDOWN in dighost.c:tcp_connected dig was making further queries after SIGINT was recieved rather than shutting down as expected. --- diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index e5cd294e221..6f06f62389f 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -3566,6 +3566,12 @@ tcp_connected(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) { debug("tcp_connected(%p, %s, %p)", handle, isc_result_totext(eresult), query); + if (eresult == ISC_R_SHUTTINGDOWN) { + query_detach(&query); + cancel_all(); + return; + } + lookup_attach(query->lookup, &l); if (eresult == ISC_R_CANCELED || eresult == ISC_R_TLSBADPEERCERT ||