mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Merge branch '3520-rndc-shutdown-hang' into 'main'
prevent a possible shutdown hang in rndc See merge request isc-projects/bind9!6734
This commit is contained in:
@@ -390,8 +390,8 @@ rndc_recvdone(isc_nmhandle_t *handle, isc_result_t result, void *arg) {
|
|||||||
REQUIRE(recvdone_handle == handle);
|
REQUIRE(recvdone_handle == handle);
|
||||||
isc_nmhandle_detach(&recvdone_handle);
|
isc_nmhandle_detach(&recvdone_handle);
|
||||||
|
|
||||||
if (atomic_load_acquire(&sends) == 0 &&
|
if (atomic_fetch_sub_release(&recvs, 1) == 1 &&
|
||||||
atomic_fetch_sub_release(&recvs, 1) == 1)
|
atomic_load_acquire(&sends) == 0)
|
||||||
{
|
{
|
||||||
shuttingdown = true;
|
shuttingdown = true;
|
||||||
isc_task_detach(&rndc_task);
|
isc_task_detach(&rndc_task);
|
||||||
|
Reference in New Issue
Block a user