mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Fix a race in tcpdns close with uv_close on timer
stop timers before closing netmgr: tcpdns_close needs to be asynchronous, it manipulates sock->timer
This commit is contained in:
@@ -1003,8 +1003,9 @@ tcp_close_direct(isc_nmsocket_t *sock) {
|
||||
}
|
||||
}
|
||||
if (sock->timer_initialized) {
|
||||
uv_close((uv_handle_t *)&sock->timer, timer_close_cb);
|
||||
sock->timer_initialized = false;
|
||||
uv_timer_stop(&sock->timer);
|
||||
uv_close((uv_handle_t *)&sock->timer, timer_close_cb);
|
||||
} else {
|
||||
isc_nmsocket_detach(&sock->server);
|
||||
uv_close(&sock->uv_handle.handle, tcp_close_cb);
|
||||
|
Reference in New Issue
Block a user