]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Don't call ReadCookedTime after select timeout
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 3 Dec 2009 11:20:50 +0000 (12:20 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 3 Dec 2009 11:20:50 +0000 (12:20 +0100)
sched.c

diff --git a/sched.c b/sched.c
index e20054a2b18270a0a09fb5961ceb886dc8dd63ec..38f5e2ea40183c67c9d9b2890a733a5e8a0df082 100644 (file)
--- a/sched.c
+++ b/sched.c
@@ -563,7 +563,6 @@ SCH_MainLoop(void)
     }
 
     status = select(one_highest_fd, &rd, NULL, NULL, ptv);
-    LCL_ReadCookedTime(&last_fdready, &err);
 
     if (status < 0) {
       if (!need_to_exit)
@@ -571,6 +570,7 @@ SCH_MainLoop(void)
     } else if (status > 0) {
       /* A file descriptor is ready to read */
 
+      LCL_ReadCookedTime(&last_fdready, &err);
       dispatch_filehandlers(status, &rd);
 
     } else {