From: Miroslav Lichvar Date: Wed, 3 Feb 2021 16:41:39 +0000 (+0100) Subject: sources: set reference after loading dump files X-Git-Tag: 4.1-pre1~69 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fa3052e776d6031cfb39b0ccec19669241f0da25;p=thirdparty%2Fchrony.git sources: set reference after loading dump files After loading the dump files with the -r option, immediately perform a source selection with forced setting of the reference. This shortens the interval when a restarted server doesn't respond with synchronized time. It no longer needs to wait for the first measurement from the best source (which had to pass all the filters). --- diff --git a/sources.c b/sources.c index 04f292c9..68d81fe0 100644 --- a/sources.c +++ b/sources.c @@ -1455,7 +1455,13 @@ SRC_ReloadSources(void) for (i = 0; i < n_sources; i++) { load_source(sources[i]); + + /* Allow an immediate update of the reference */ + sources[i]->updates++; } + + /* Select sources and set the reference */ + SRC_SelectSource(NULL); } /* ================================================== */