2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

fix: dev: mark loop as shuttingdown earlier in shutdown_cb

Merge branch 'loop-shuttingdown' into 'main'

See merge request isc-projects/bind9!9827
This commit is contained in:
Ondřej Surý
2024-12-10 19:51:20 +00:00

View File

@@ -140,8 +140,6 @@ static void
shutdown_trigger_close_cb(uv_handle_t *handle) {
isc_loop_t *loop = uv_handle_get_data(handle);
loop->shuttingdown = true;
isc_loop_detach(&loop);
}
@@ -167,6 +165,9 @@ shutdown_cb(uv_async_t *handle) {
/* Make sure, we can't be called again */
uv_close(&loop->shutdown_trigger, shutdown_trigger_close_cb);
/* Mark this loop as shutting down */
loop->shuttingdown = true;
if (DEFAULT_LOOP(loopmgr) == CURRENT_LOOP(loopmgr)) {
/* Stop the signal handlers */
isc_signal_stop(loopmgr->sigterm);