From: Alessio Podda Date: Wed, 12 Aug 2026 08:54:17 +0000 (+0200) Subject: Remove duplicate calls in isc__nm_udp_close X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=084b818dd3f7eb0f1cf81ad5badff980d6d16a78;p=thirdparty%2Fbind9.git Remove duplicate calls in isc__nm_udp_close As an editing artifact, the calls to close the socket and stop the timer were issued twice, this has been fixed. --- diff --git a/lib/isc/netmgr/udp.c b/lib/isc/netmgr/udp.c index 7674c98d21f..f0e21cb262d 100644 --- a/lib/isc/netmgr/udp.c +++ b/lib/isc/netmgr/udp.c @@ -1072,17 +1072,13 @@ isc__nm_udp_close(isc_nmsocket_t *sock) { sock->closing = true; - isc__nmsocket_clearcb(sock); - isc__nmsocket_timer_stop(sock); - isc__nm_stop_reading(sock); - /* * The order of the close operation is important here, the uv_close() * gets scheduled in the reverse order, so we need to close the timer * last, so its gone by the time we destroy the socket */ - /* 2. close the listening socket */ + /* 1. close the listening socket */ isc__nmsocket_clearcb(sock); isc__nm_stop_reading(sock); if (sock->client) { @@ -1090,7 +1086,7 @@ isc__nm_udp_close(isc_nmsocket_t *sock) { } uv_close(&sock->uv_handle.handle, udp_close_cb); - /* 1. close the read timer */ + /* 2. close the read timer */ isc__nmsocket_timer_stop(sock); uv_close((uv_handle_t *)&sock->read_timer, sock->client ? NULL : udp_timer_close_cb);