]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bugfix: Speed up processing of queued events significantly, to not cause
authorhno <>
Sun, 6 Jul 2003 20:37:45 +0000 (20:37 +0000)
committerhno <>
Sun, 6 Jul 2003 20:37:45 +0000 (20:37 +0000)
large delays when under low load.

src/main.cc

index 810729de16d1b8f141787d07b5797040b00917ea..14798a444903acf1c02e0b108b96a1bc31ad2c48 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: main.cc,v 1.380 2003/06/08 23:27:50 wessels Exp $
+ * $Id: main.cc,v 1.381 2003/07/06 14:37:45 hno Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -1117,8 +1117,15 @@ main(int argc, char **argv)
         /* Attempt any pending storedir IO */
         storeDirCallback();
 
+        /* twice to deal with indirectly queued events
+         * resulting from the first call. These are usually
+         * callbacks and should be dealt with immediately.
+         */
         comm_calliocallback();
 
+        if (comm_iocallbackpendin())
+            comm_calliocallback();
+
         switch (comm_select(loop_delay)) {
 
         case COMM_OK: