ntp: don't stop online burst when sending fails

Don't stop online burst for unreachable sources until sending succeeds.
This is mainly useful with iburst when chronyd is started before the
network is configured.
This commit is contained in:
Miroslav Lichvar
2014-08-20 16:41:18 +02:00
parent d446950c6a
commit 4e66b5ce8a
3 changed files with 13 additions and 0 deletions

View File

@@ -891,6 +891,10 @@ transmit_timeout(void *arg)
switch (inst->opmode) {
case MD_BURST_WAS_ONLINE:
/* When not reachable, don't stop online burst until sending succeeds */
if (!sent && !SRC_IsReachable(inst->source))
break;
/* Fall through */
case MD_BURST_WAS_OFFLINE:
--inst->burst_total_samples_to_go;
break;