]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Need to unregister forward.c state for persistent connections, without
authorwessels <>
Wed, 10 Jun 1998 04:58:01 +0000 (04:58 +0000)
committerwessels <>
Wed, 10 Jun 1998 04:58:01 +0000 (04:58 +0000)
closing the FD.

src/forward.cc
src/http.cc

index 0ec4146356b952a20049353dfd426a6e925b79ee..2504d4fcae1ec4fdf8a877e48d38a54f3c17e00c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: forward.cc,v 1.6 1998/06/09 22:43:48 wessels Exp $
+ * $Id: forward.cc,v 1.7 1998/06/09 22:58:01 wessels Exp $
  *
  * DEBUG: section 17    Request Forwarding
  * AUTHOR: Duane Wessels
@@ -372,3 +372,15 @@ fwdAbort(void *data)
        debug(17,1)("fwdAbort: %s\n", storeUrl(fwdState->entry));
         fwdStateFree(fwdState);
 }
+
+/*
+ * Frees fwdState without closing FD or generating an abort
+ */
+void
+fwdUnregister(int fd, FwdState *fwdState)
+{
+       assert(fd = fwdState->server_fd);
+       comm_remove_close_handler(fd, fwdServerClosed, fwdState);
+       fwdState->server_fd = -1;
+       fwdStateFree(fwdState);
+}
index 20c97e694c47e1aa9317466c1d71627704240371..d6d1e2b1a19911f05ef27416a2ab8458683dccd4 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http.cc,v 1.285 1998/06/09 21:18:50 wessels Exp $
+ * $Id: http.cc,v 1.286 1998/06/09 22:58:02 wessels Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -504,6 +504,7 @@ httpReadReply(int fd, void *data)
            commSetTimeout(fd, -1, NULL, NULL);
            commSetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0);
            comm_remove_close_handler(fd, httpStateFree, httpState);
+           fwdUnregister(fd, httpState->fwdState);
            storeComplete(entry);       /* deallocates mem_obj->request */
            pconnPush(fd, request->host, request->port);
            httpState->fd = -1;