]> PatchyGit - patchyircd.git/commitdiff
netpoll: fix NETPOLL_MAXFDS check
authorEgor <egor@patchysicp.xyz>
Sat, 1 Mar 2025 14:56:31 +0000 (16:56 +0200)
committerEgor <egor@patchysicp.xyz>
Sat, 1 Mar 2025 14:56:31 +0000 (16:56 +0200)
src/netpoll.cpp

index 33aea7c..0a09e58 100644 (file)
@@ -250,7 +250,7 @@ void net_poll_add(SOCKET fd, int type, void *assoc)
                fprintf(stderr, "net_poll_add: socket already added\n");
                abort();
        }
-       if (i == NETPOLL_MAXFDS) {
+       if (nfds == NETPOLL_MAXFDS) {
                fprintf(stderr, "net_poll_add: NETPOLL_MAXFDS limit\n");
                abort();
        }