]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Fix poll timeout with symmetric peer and poll 0
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 3 Jun 2013 09:13:45 +0000 (11:13 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 3 Jun 2013 14:03:05 +0000 (16:03 +0200)
ntp_core.c

index 412bbc80bcf641d75fd91a50d8cbe712f59bf54d..eac5a19fb565e7a8e1e56dcaab1725c359bdb3b6 100644 (file)
@@ -1144,7 +1144,7 @@ receive_packet(NTP_Packet *message, struct timeval *now, double now_err, NCR_Ins
           if (poll_to_use < inst->minpoll) poll_to_use = inst->minpoll;
           if (poll_to_use > inst->maxpoll) poll_to_use = inst->maxpoll;
           
-          delay_time = (double) (1UL<<(poll_to_use - 1));
+          delay_time = (double) (1UL<<poll_to_use) / 2.0;
           
           break;
         default: