It is not sufficient to check for disabled server sockets as they are
not open only after the special reference modes end (e.g. initstepslew).
Fixes: 004986310d2a ("ntp: skip loop test if no server socket is open")
NTP_Leap leap_status;
uint32_t our_ref_id;
- /* Check if a server socket is open, i.e. a client or peer can actually
- be synchronised to us */
- if (!NIO_IsServerSocketOpen())
+ /* Check if a client or peer can be synchronised to us */
+ if (!NIO_IsServerSocketOpen() || REF_GetMode() != REF_ModeNormal)
return 1;
/* Check if the source indicates that it is synchronised to our address