From ae24792ea2858517a3ed50ac247ab59c84cd81f2 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 7 Dec 2023 13:36:46 +1100 Subject: [PATCH] Handle ISC_R_SHUTTINGDOWN in dighost.c:tcp_connected dig was making further queries after SIGINT was recieved rather than shutting down as expected. --- bin/dig/dighost.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index e5cd294e22..6f06f62389 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 ||