From a7c5ae5d2e30e3322f62c6b5cebb800b36ac9ec1 Mon Sep 17 00:00:00 2001 From: adrian <> Date: Sun, 27 Oct 2002 21:19:39 +0000 Subject: [PATCH] Damnit, only drop accept()s into a period event if we're UNDER the RESERVED_FD limit, not above! --- src/comm.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/comm.cc b/src/comm.cc index de1c4eefb9..2521cc0f2d 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1,6 +1,6 @@ /* - * $Id: comm.cc,v 1.357 2002/10/27 14:15:49 adrian Exp $ + * $Id: comm.cc,v 1.358 2002/10/27 14:19:39 adrian Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -745,7 +745,7 @@ comm_accept_check_event(void *data) static time_t last_warn = 0; int fd = ((fdc_t *)(data))->fd; - if (fdNFree() >= RESERVED_FD) { + if (fdNFree() < RESERVED_FD) { commSetSelect(fd, COMM_SELECT_READ, comm_accept_try, NULL, 0); return; } @@ -1822,7 +1822,7 @@ comm_accept_try(int fd, void *data) for (count = 0; count < MAX_ACCEPT_PER_LOOP; count++) { /* If we're out of fds, register an event and return now */ - if (fdNFree() >= RESERVED_FD) { + if (fdNFree() < RESERVED_FD) { debug(5, 3) ("comm_accept_try: we're out of fds - deferring io!\n"); eventAdd("comm_accept_check_event", comm_accept_check_event, &fdc_table[fd], 1000.0 / (double)(fdc_table[fd].accept.check_delay), 1); -- 2.47.3