]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
stop opening swap files for READING if we hit the 'max_open_disk_fd' limit
authorwessels <>
Wed, 10 Feb 1999 05:26:54 +0000 (05:26 +0000)
committerwessels <>
Wed, 10 Feb 1999 05:26:54 +0000 (05:26 +0000)
src/store_client.cc

index 81b45b944fbc08a2df7bd5027ba63174e94eff15..bd88ec08b0efaeb00f080c3208b5593a9056df8c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_client.cc,v 1.58 1999/01/22 04:09:38 wessels Exp $
+ * $Id: store_client.cc,v 1.59 1999/02/09 22:26:54 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager Client-Side Interface
  * AUTHOR: Duane Wessels
@@ -262,7 +262,11 @@ storeClientCopy2(StoreEntry * e, store_client * sc)
        debug(20, 3) ("storeClientCopy2: Need to open swap in file\n");
        assert(sc->type == STORE_DISK_CLIENT);
        /* gotta open the swapin file */
-       /* assert(sc->copy_offset == 0); */
+       if (store_open_disk_fd > Config.max_open_disk_fds) {
+           /* yuck -- this causes a TCP_SWAPFAIL_MISS on the client side */
+           sc->callback = NULL;
+           callback(sc->callback_data, sc->copy_buf, -1);
+       }
        if (!sc->flags.disk_io_pending) {
            sc->flags.disk_io_pending = 1;
            storeSwapInStart(e, storeClientFileOpened, sc);