]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
deleted ERR_CLIENT_ABORT
authorwessels <>
Tue, 12 Jan 1999 06:29:41 +0000 (06:29 +0000)
committerwessels <>
Tue, 12 Jan 1999 06:29:41 +0000 (06:29 +0000)
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

src/enums.h
src/forward.cc
src/icp_v2.cc

index 4aa4ffea203c2bb236cd632f36810588220e9f3a..77038c113e7fa505fac3e77346a3c68163e09221 100644 (file)
@@ -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,
index eaa28ea8581a1b2025a7115eb1eeaf80a57a3a54..1be1cab9444bc8b530c05a95db1df2d4d334b6e3 100644 (file)
@@ -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;
index ea0e0f8c45a981a82b02dd2e98200210ccfe1134..c7c3695953ca1f54d5020eb32bb037ec074b2a91 100644 (file)
@@ -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;
     }
 }