From: wessels <> Date: Wed, 10 Feb 1999 05:26:54 +0000 (+0000) Subject: stop opening swap files for READING if we hit the 'max_open_disk_fd' limit X-Git-Tag: SQUID_3_0_PRE1~2307 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43f3238ff4a23995ff32fa7f149833105bb97d9e;p=thirdparty%2Fsquid.git stop opening swap files for READING if we hit the 'max_open_disk_fd' limit --- diff --git a/src/store_client.cc b/src/store_client.cc index 81b45b944f..bd88ec08b0 100644 --- a/src/store_client.cc +++ b/src/store_client.cc @@ -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);