]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
We used to close persistent connections if the number of free
authorwessels <>
Fri, 15 Jan 1999 06:15:43 +0000 (06:15 +0000)
committerwessels <>
Fri, 15 Jan 1999 06:15:43 +0000 (06:15 +0000)
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.

src/pconn.cc

index f56d1b6d26cafc68927d7c1cf3dd40f50105afcc..2ecbec8857d0eb6b3e0ebaca91a16abd72240dc1 100644 (file)
@@ -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;