]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Handle ISC_R_SHUTTINGDOWN in dighost.c:recv_done
authorMark Andrews <marka@isc.org>
Mon, 4 Dec 2023 02:21:20 +0000 (13:21 +1100)
committerMark Andrews <marka@isc.org>
Mon, 4 Dec 2023 20:30:52 +0000 (07:30 +1100)
When dighost.c:recv_done is called with ISC_R_SHUTTINGDOWN cancel
all outstanding lookups as this indicates SIGTERM was recieved.

bin/dig/dighost.c

index 0dd7b3a8258ece9b165b3f7be856dab26440b301..17c4e388d5c23512d8627f772e654b26f9576cf0 100644 (file)
@@ -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);