From: Miroslav Lichvar Date: Tue, 3 Jun 2014 15:55:35 +0000 (+0200) Subject: main: delay switching to normal mode after initstepslew X-Git-Tag: 1.30-pre1~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ead3ca14a0326e03bf5e5324929087d1f415923d;p=thirdparty%2Fchrony.git main: delay switching to normal mode after initstepslew This prevents polling interval shorter than the burst interval if some configured servers were used also for initstepslew. --- diff --git a/main.c b/main.c index 79ce2dec..f56402f8 100644 --- a/main.c +++ b/main.c @@ -182,9 +182,10 @@ reference_mode_end(int result) SCH_QuitProgram(); break; case REF_ModeInitStepSlew: - /* post_init_ntp_hook removes sources and a source call is - on the stack here, so it can't be called directly */ - SCH_AddTimeoutByDelay(0.0, post_init_ntp_hook, NULL); + /* Switch to the normal mode, the delay is used to prevent polling + interval shorter than the burst interval if some configured servers + were used also for initstepslew */ + SCH_AddTimeoutByDelay(2.0, post_init_ntp_hook, NULL); break; default: assert(0);