Fix poll timeout with symmetric peer and poll 0

This commit is contained in:
Miroslav Lichvar 2013-06-03 11:13:45 +02:00
parent 359d444343
commit a2656a20bc

View 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->minpoll) poll_to_use = inst->minpoll;
if (poll_to_use > inst->maxpoll) poll_to_use = inst->maxpoll; 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; break;
default: default: