From: wessels <> Date: Wed, 10 Jun 1998 04:58:01 +0000 (+0000) Subject: Need to unregister forward.c state for persistent connections, without X-Git-Tag: SQUID_3_0_PRE1~3149 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b49cd310d2cf71c4a57c2a0e5a263b30d45d15d;p=thirdparty%2Fsquid.git Need to unregister forward.c state for persistent connections, without closing the FD. --- diff --git a/src/forward.cc b/src/forward.cc index 0ec4146356..2504d4fcae 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -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); +} diff --git a/src/http.cc b/src/http.cc index 20c97e694c..d6d1e2b1a1 100644 --- a/src/http.cc +++ b/src/http.cc @@ -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;