Fix a possible hang in dig if a send is interrupted/canceled

When send_done() is called with a ISC_R_CANCELED status (e.g. because
of a signal from ctrl+c), dig can fail to shutdown because
check_if_done() is not called in the branch. Add a check_if_done()
call.

(cherry picked from commit 5d1a8fe755)
This commit is contained in:
Aram Sargsyan 2025-07-01 10:49:39 +00:00 committed by Arаm Sаrgsyаn
parent b52d2e0392
commit 33e37f7030

View file

@ -2754,6 +2754,7 @@ send_done(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) {
}
query_detach(&query);
lookup_detach(&l);
check_if_done();
return;
} else if (eresult != ISC_R_SUCCESS) {
debug("send failed: %s", isc_result_totext(eresult));