From: Artem Boldariev Date: Tue, 10 May 2022 16:44:28 +0000 (+0300) Subject: Avoid aborting when uv_timer_start() is used on a closing socket X-Git-Tag: v9.19.2~22^2~2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=245f7cec2ea9005a360478959e4a446c666eab75;p=thirdparty%2Fbind9.git Avoid aborting when uv_timer_start() is used on a closing socket In such a case it will return UV_EINVAL (-EINVAL), leading to aborting, as the code expects the function to succeed. --- diff --git a/lib/isc/netmgr/netmgr.c b/lib/isc/netmgr/netmgr.c index b6ae1ca3192..ad9dc3d57fd 100644 --- a/lib/isc/netmgr/netmgr.c +++ b/lib/isc/netmgr/netmgr.c @@ -2033,6 +2033,10 @@ void isc__nmsocket_timer_restart(isc_nmsocket_t *sock) { REQUIRE(VALID_NMSOCK(sock)); + if (uv_is_closing((uv_handle_t *)&sock->read_timer)) { + return; + } + if (atomic_load(&sock->connecting)) { int r;