diff --git a/src/libCom/osi/os/RTEMS/iocClock.c b/src/libCom/osi/os/RTEMS/iocClock.c index d32c5cda9..a544421dd 100644 --- a/src/libCom/osi/os/RTEMS/iocClock.c +++ b/src/libCom/osi/os/RTEMS/iocClock.c @@ -69,8 +69,13 @@ static void syncNTP(void) while(1) { double diffTime; + extern int rtems_bsdnet_get_ntp(int, int(*)(), struct timespec *); if(!firstTime)epicsThreadSleep(iocClockSyncRate); firstTime = 0; + if(piocClockPvt->getCurrent != iocClockGetCurrent) { + errlogPrintf("syncNTP: NTP client terminating.\n"); + return; + } status = rtems_bsdnet_get_ntp(-1, NULL, &Currtime); if(status) { ++nConsecutiveBad;