Skip to content

Commit

Permalink
Fix fdset caching.
Browse files Browse the repository at this point in the history
Need to keep track of current size of fdset, assignment was reversed.
  • Loading branch information
dougnazar committed Dec 14, 2024
1 parent c98353f commit 4320117
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nrpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit 4320117

Please sign in to comment.