Commit 0d637b59 authored by Witold Krecicki's avatar Witold Krecicki

netmgr: we can't uv_close(sock->timer) when in sock->timer close callback

parent 1bee87a3
......@@ -760,8 +760,11 @@ nmsocket_cleanup(isc_nmsocket_t *sock, bool dofree) {
if (sock->timer_initialized) {
sock->timer_initialized = false;
uv_timer_stop(&sock->timer);
uv_close((uv_handle_t *)&sock->timer, NULL);
/* We might be in timer callback */
if (!uv_is_closing((uv_handle_t *) &sock->timer)) {
uv_timer_stop(&sock->timer);
uv_close((uv_handle_t *)&sock->timer, NULL);
}
}
isc_astack_destroy(sock->inactivehandles);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment