From: robertc <> Date: Thu, 6 Feb 2003 07:02:51 +0000 (+0000) Subject: Summary: Fix bug #484. X-Git-Tag: SQUID_3_0_PRE1~388 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d8fd0f18418bf8c4abc1083a4483709a142f9d36;p=thirdparty%2Fsquid.git Summary: Fix bug #484. Keywords: Send a shutting down error when hitting the race between connect start, starting a shutdown and shutting down the connection. --- diff --git a/src/forward.cc b/src/forward.cc index 9f46af2bf6..35bf03191e 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -1,6 +1,6 @@ /* - * $Id: forward.cc,v 1.92 2003/01/28 01:29:34 robertc Exp $ + * $Id: forward.cc,v 1.93 2003/02/06 00:02:51 robertc Exp $ * * DEBUG: section 17 Request Forwarding * AUTHOR: Duane Wessels @@ -132,6 +132,8 @@ fwdStateFree(FwdState * fwdState) static int fwdCheckRetry(FwdState * fwdState) { + if (shutting_down) + return 0; if (fwdState->entry->store_status != STORE_PENDING) return 0; if (!fwdState->entry->isEmpty()) @@ -176,9 +178,13 @@ fwdServerClosed(int fd, void *data) } /* use eventAdd to break potential call sequence loops */ eventAdd("fwdConnectStart", fwdConnectStart, fwdState, 0.0, 0); - } else { - fwdStateFree(fwdState); + return; + } + if (!fwdState->err && shutting_down) { + fwdState->err =errorCon(ERR_SHUTTING_DOWN, HTTP_SERVICE_UNAVAILABLE); + fwdState->err->request = requestLink(fwdState->request); } + fwdStateFree(fwdState); } #if USE_SSL