From 4320117cbad5a3e45aa2f4830ce17e11aea40fa4 Mon Sep 17 00:00:00 2001 From: Doug Nazar Date: Sat, 14 Dec 2024 09:50:48 -0500 Subject: [PATCH] Fix fdset caching. Need to keep track of current size of fdset, assignment was reversed. --- src/nrpe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nrpe.c b/src/nrpe.c index 656f945..a98e7e2 100644 --- a/src/nrpe.c +++ b/src/nrpe.c @@ -1202,7 +1202,7 @@ void wait_for_connections(void) if (need_fdset > count_fdset) { free(fdset); fdset = (fd_set *) calloc(need_fdset, sizeof(fd_mask)); - need_fdset = count_fdset; + count_fdset = need_fdset; } else { memset(fdset, 0, count_fdset * sizeof(fd_mask)); }