]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Henrik:
authorwessels <>
Sat, 16 May 1998 01:15:03 +0000 (01:15 +0000)
committerwessels <>
Sat, 16 May 1998 01:15:03 +0000 (01:15 +0000)
be verbose when refusing new HTTP connections

src/client_side.cc

index b7bd80af9dc929e7245149404e7c9b609a71f6dd..e254c06367113acf8ef082fd5cd631a2d42a4ba4 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.306 1998/05/14 16:33:48 wessels Exp $
+ * $Id: client_side.cc,v 1.307 1998/05/15 19:15:03 wessels Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -2100,7 +2100,14 @@ requestTimeout(int fd, void *data)
 int
 httpAcceptDefer(int fdnotused, void *notused)
 {
-    return fdNFree() < RESERVED_FD;
+    static time_t last_warn = 0;
+    if (fdNFree() >= RESERVED_FD)
+       return 0;
+    if (last_warn + 15 < squid_curtime) {
+       debug(33, 0) ("WARNING! Your cache is running out of filedescriptors\n");
+       last_warn = squid_curtime;
+    }
+    return 1;
 }
 
 /* Handle a new connection on HTTP socket. */