]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Re-add the comment to streamdns_readmore()
authorOndřej Surý <ondrej@isc.org>
Fri, 24 Mar 2023 11:20:07 +0000 (12:20 +0100)
committerOndřej Surý <ondrej@isc.org>
Wed, 29 Mar 2023 19:16:44 +0000 (21:16 +0200)
Put the comment back, so it's more obvious that we are only restarting
timer when there's a last handle attached to the socket; there has to be
always at least one.

lib/isc/netmgr/streamdns.c

index 2b3c8c38b968b377f732bac26e176a7dec206e26..a34e46d3e6ce8d67293f55e291dcf1bfb8d9d556 100644 (file)
@@ -103,8 +103,10 @@ static void
 streamdns_readmore(isc_nmsocket_t *sock, isc_nmhandle_t *transphandle) {
        streamdns_resumeread(sock, transphandle);
 
+       /* Restart the timer only if there's a last single active handle */
        isc_nmhandle_t *handle = ISC_LIST_HEAD(sock->active_handles);
-       if (handle != NULL && ISC_LIST_NEXT(handle, active_link) == NULL) {
+       INSIST(handle != NULL);
+       if (ISC_LIST_NEXT(handle, active_link) == NULL) {
                isc__nmsocket_timer_start(sock);
        }
 }