chiark / gitweb /
timedated: do not reset poll interval with a spike
authorKay Sievers <kay@vrfy.org>
Fri, 21 Mar 2014 16:49:50 +0000 (17:49 +0100)
committerKay Sievers <kay@vrfy.org>
Fri, 21 Mar 2014 19:22:38 +0000 (20:22 +0100)
src/timedate/timedate-sntp.c

index e4aad36..cb0bf79 100644 (file)
@@ -442,7 +442,7 @@ static void sntp_adjust_poll(SNTPContext *sntp, double offset, bool spike) {
         }
 
         /* set to minimal poll interval */
-        if (fabs(offset) > NTP_ACCURACY_SEC) {
+        if (!spike && fabs(offset) > NTP_ACCURACY_SEC) {
                 sntp->poll_interval_usec = NTP_POLL_INTERVAL_MIN_SEC * USEC_PER_SEC;
                 return;
         }