]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix pinger immediate shutdowns
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 4 Jan 2009 12:49:16 +0000 (01:49 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 4 Jan 2009 12:49:16 +0000 (01:49 +1300)
pinger runs okay when started manually, but shuts down after a sucessful
startup when run by Squid. This was due to the last_request timer being
left at zero/epoch.

Initialize the last_check timer base correctly.

src/icmp/pinger.cc

index 42aa0cfc5c8d3620dd52cfe7c2f3d277a219ce52..cb0e189bf78a996f0fcf9b76fdf18584cc27bc5c 100644 (file)
@@ -192,6 +192,8 @@ main(int argc, char *argv[])
     setgid(getgid());
     setuid(getuid());
 
+    last_check_time = squid_curtime;
+
     for (;;) {
         tv.tv_sec = PINGER_TIMEOUT;
         tv.tv_usec = 0;