]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove duplicate calls in isc__nm_udp_close 12471/head
authorAlessio Podda <alessio@isc.org>
Wed, 12 Aug 2026 08:54:17 +0000 (10:54 +0200)
committerAlessio Podda <alessio@isc.org>
Wed, 12 Aug 2026 12:12:45 +0000 (14:12 +0200)
As an editing artifact, the calls to close the socket and stop the
timer were issued twice, this has been fixed.

lib/isc/netmgr/udp.c

index 7674c98d21f66e07949d4a4d23e343319d74a89c..f0e21cb262d1bb9941ff69600ff4c8d3e1b313d7 100644 (file)
@@ -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);