]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bugfix: Make sure the clock is updated after poll/select to account for
authorhno <>
Sun, 6 Jul 2003 18:03:40 +0000 (18:03 +0000)
committerhno <>
Sun, 6 Jul 2003 18:03:40 +0000 (18:03 +0000)
the time sleeping waiting for I/O.

src/comm_poll.cc
src/comm_select.cc

index fd44743083086f4249bacaa0b097b1cb540bacd8..96b97c2565138186ac4fcb6a2af599a7e66d205e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm_poll.cc,v 1.11 2003/03/04 01:40:27 robertc Exp $
+ * $Id: comm_poll.cc,v 1.12 2003/07/06 12:03:40 hno Exp $
  *
  * DEBUG: section 5     Socket Functions
  *
@@ -463,6 +463,8 @@ comm_select(int msec)
             /* NOTREACHED */
         }
 
+        getCurrentTime();
+
         debug(5, num ? 5 : 8) ("comm_poll: %d+%ld FDs ready\n", num, npending);
         statHistCount(&statCounter.select_fds_hist, num);
         /* Check timeout handlers ONCE each second. */
index 90a25a064a041916fb282f5acf95c78ff6ec310a..08824ab66d82a5b45dc8bc686ac09f5f79c78323 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm_select.cc,v 1.69 2003/03/04 01:40:27 robertc Exp $
+ * $Id: comm_select.cc,v 1.70 2003/07/06 12:03:40 hno Exp $
  *
  * DEBUG: section 5     Socket Functions
  *
@@ -496,8 +496,10 @@ comm_select(int msec)
         if (num < 0 && !pending)
             continue;
 
-        debug(5, num ? 5 : 8) ("comm_select: %d+%d FDs ready at %d\n",
-                               num, pending, (int) squid_curtime);
+        getCurrentTime();
+
+        debug(5, num ? 5 : 8) ("comm_select: %d+%d FDs ready\n",
+                               num, pending);
 
         statHistCount(&statCounter.select_fds_hist, num);