From: wessels <> Date: Fri, 15 Jan 1999 06:15:43 +0000 (+0000) Subject: We used to close persistent connections if the number of free X-Git-Tag: SQUID_3_0_PRE1~2403 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ce00f705c47f0161de5a833b05ab78a9eb4aa91a;p=thirdparty%2Fsquid.git We used to close persistent connections if the number of free descriptors was less than four times the reservedFD limit. On small-FD systems, we will never keep a pconn open because reservedFD is set to numberFD/4. Lets try twice the reserved FD limit. --- diff --git a/src/pconn.cc b/src/pconn.cc index f56d1b6d26..2ecbec8857 100644 --- a/src/pconn.cc +++ b/src/pconn.cc @@ -1,6 +1,6 @@ /* - * $Id: pconn.cc,v 1.24 1998/09/04 23:04:56 wessels Exp $ + * $Id: pconn.cc,v 1.25 1999/01/14 23:15:43 wessels Exp $ * * DEBUG: section 48 Persistent Connections * AUTHOR: Duane Wessels @@ -181,7 +181,7 @@ pconnPush(int fd, const char *host, u_short port) int *old; LOCAL_ARRAY(char, key, SQUIDHOSTNAMELEN + 10); LOCAL_ARRAY(char, desc, FD_DESC_SZ); - if (fdNFree() < (RESERVED_FD << 2)) { + if (fdNFree() < (RESERVED_FD << 1)) { debug(48, 3) ("pconnPush: Not many unused FDs\n"); comm_close(fd); return;