]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
mem client fix from 2.3 branch
authorwessels <>
Wed, 1 Dec 1999 11:24:27 +0000 (11:24 +0000)
committerwessels <>
Wed, 1 Dec 1999 11:24:27 +0000 (11:24 +0000)
src/store_client.cc

index 0e37f849e2e25655cdbbe0414f22f51623c1ff50..81cda22e1fee5d5e1ecb728e80ecd243ff50fe89 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_client.cc,v 1.78 1999/10/04 22:49:30 wessels Exp $
+ * $Id: store_client.cc,v 1.79 1999/12/01 04:24:27 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager Client-Side Interface
  * AUTHOR: Duane Wessels
@@ -98,6 +98,14 @@ storeClientType(StoreEntry * e)
      */
     else if (mem->nclients == 1)
        return STORE_MEM_CLIENT;
+    /*
+     * If there is no disk file to open yet, we must make this a
+     * mem client.  If we can't open the swapin file before writing
+     * to the client, there is no guarantee that we will be able
+     * to open it later.
+     */
+    else if (e->swap_status == SWAPOUT_NONE)
+       return STORE_MEM_CLIENT;
     /*
      * otherwise, make subsequent clients read from disk so they
      * can not delay the first, and vice-versa.