From: wessels <> Date: Tue, 12 Jan 1999 06:29:41 +0000 (+0000) Subject: deleted ERR_CLIENT_ABORT X-Git-Tag: SQUID_3_0_PRE1~2425 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=05b744f353826f972f9e7646218873ce5ba060a1;p=thirdparty%2Fsquid.git deleted ERR_CLIENT_ABORT added ERR_SHUTTING_DOWN set theOutIcpConnect = -1 when we close that FD have fwdStart() return ERR_SHUTTING_DOWN if we are shutting down the cache --- diff --git a/src/enums.h b/src/enums.h index 4aa4ffea20..77038c113e 100644 --- a/src/enums.h +++ b/src/enums.h @@ -1,6 +1,6 @@ /* - * $Id: enums.h,v 1.141 1999/01/11 16:50:30 wessels Exp $ + * $Id: enums.h,v 1.142 1999/01/11 23:29:41 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -60,7 +60,7 @@ typedef enum { ERR_LIFETIME_EXP, ERR_READ_ERROR, ERR_WRITE_ERROR, - ERR_CLIENT_ABORT, + ERR_SHUTTING_DOWN, ERR_CONNECT_FAIL, ERR_INVALID_REQ, ERR_UNSUP_REQ, diff --git a/src/forward.cc b/src/forward.cc index eaa28ea858..1be1cab944 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -1,6 +1,6 @@ /* - * $Id: forward.cc,v 1.42 1999/01/11 16:50:31 wessels Exp $ + * $Id: forward.cc,v 1.43 1999/01/11 23:29:42 wessels Exp $ * * DEBUG: section 17 Request Forwarding * AUTHOR: Duane Wessels @@ -396,6 +396,13 @@ fwdStart(int fd, StoreEntry * e, request_t * r, struct in_addr client_addr) return; } } + if (shutting_down) { + /* more yuck */ + err = errorCon(ERR_SHUTTING_DOWN, HTTP_SERVICE_UNAVAILABLE); + err->request = requestLink(r); + errorAppendEntry(e, err); + return; + } debug(17, 3) ("fwdStart: '%s'\n", storeUrl(e)); e->mem_obj->request = requestLink(r); e->mem_obj->fd = fd; diff --git a/src/icp_v2.cc b/src/icp_v2.cc index ea0e0f8c45..c7c3695953 100644 --- a/src/icp_v2.cc +++ b/src/icp_v2.cc @@ -1,6 +1,6 @@ /* - * $Id: icp_v2.cc,v 1.56 1998/12/05 00:54:29 wessels Exp $ + * $Id: icp_v2.cc,v 1.57 1999/01/11 23:29:42 wessels Exp $ * * DEBUG: section 12 Internet Cache Protocol * AUTHOR: Duane Wessels @@ -494,6 +494,7 @@ icpConnectionClose(void) if (theOutIcpConnection > -1) { debug(12, 1) ("FD %d Closing ICP connection\n", theOutIcpConnection); comm_close(theOutIcpConnection); + theOutIcpConnection = -1; } }