]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
drain redirect requests during shutdown
authorwessels <>
Sat, 17 Aug 1996 11:09:00 +0000 (11:09 +0000)
committerwessels <>
Sat, 17 Aug 1996 11:09:00 +0000 (11:09 +0000)
src/redirect.cc

index 6b6844d2b4422e892d6a309b73a8cf51412d1f7c..643525942f31dbe91be7d61c1da1663885ffedb3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: redirect.cc,v 1.8 1996/08/14 21:38:29 wessels Exp $
+ * $Id: redirect.cc,v 1.9 1996/08/17 05:09:00 wessels Exp $
  *
  * DEBUG: section 29    Redirector
  * AUTHOR: Duane Wessels
@@ -381,9 +381,15 @@ void redirectOpenServers()
 void redirectShutdownServers()
 {
     redirector_t *redirect = NULL;
+    redirectStateData *r = NULL;
     int k;
     if (Config.Program.redirect == NULL)
        return;
+    if (redirectQueueHead) {
+        while ((redirect = GetFirstAvailable()) && (r = Dequeue()))
+           redirectDispatch(redirect, r);
+       return;
+    }
     for (k = 0; k < NRedirectors; k++) {
        redirect = *(redirect_child_table + k);
        if (!(redirect->flags & REDIRECT_FLAG_ALIVE))