]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
reset mem->fd == -1 if we unregister that client
authorwessels <>
Sun, 10 May 1998 07:46:53 +0000 (07:46 +0000)
committerwessels <>
Sun, 10 May 1998 07:46:53 +0000 (07:46 +0000)
src/store_client.cc

index f797074b28ba5e42466045eaa8ba24e693066884..40835bf91318bb5da3144c4763d18eec22ba7eb2 100644 (file)
@@ -360,6 +360,13 @@ storeUnregister(StoreEntry * e, void *data)
     }
     if (sc == NULL)
        return 0;
+    if (sc == mem->clients) {
+       /*
+        * If we are unregistering the _first_ client for this
+        * entry, then we have to reset the client FD to -1.
+        */
+       mem->fd = -1;
+    }
     *S = sc->next;
     mem->nclients--;
     sc->flags.disk_io_pending = 0;