]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
ntp: reset poll score
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 15 Jun 2023 12:09:21 +0000 (14:09 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 15 Jun 2023 12:23:47 +0000 (14:23 +0200)
When the polling interval is reset (e.g. after replacement), don't
forget to reset also the score impacting the next poll adjustment.

ntp_core.c

index 02394b84f14194a5536d370756301fca566ca231..9128d77c3f12d233dac97ace533e7a18724365ab 100644 (file)
@@ -803,6 +803,8 @@ NCR_ResetInstance(NCR_Instance instance)
 void
 NCR_ResetPoll(NCR_Instance instance)
 {
+  instance->poll_score = 0.0;
+
   if (instance->local_poll != instance->minpoll) {
     instance->local_poll = instance->minpoll;