From: Miroslav Lichvar Date: Wed, 11 May 2022 09:53:07 +0000 (+0200) Subject: refclock: set minimum maxlockage in local mode X-Git-Tag: 4.3-pre1~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0a496dcb423387e5faa3ab41e14dd6cf7743776;p=thirdparty%2Fchrony.git refclock: set minimum maxlockage in local mode Use 3 as the minimum maxlockage in the local mode to avoid disruptions due to losing the lock when a single sample is missed, e.g. when the PPS driver polling interval is slightly longer than the pulse interval and a pulse is skipped. --- diff --git a/refclock.c b/refclock.c index b59acc35..e91828aa 100644 --- a/refclock.c +++ b/refclock.c @@ -237,6 +237,7 @@ RCL_AddRefclock(RefclockParameters *params) inst->pps_forced = 1; inst->lock_ref = inst->ref_id; inst->leap_status = LEAP_Unsynchronised; + inst->max_lock_age = MAX(inst->max_lock_age, 3); } if (inst->driver->poll) {