mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 05:35:07 -05:00
ntp: skip loop test if no server socket is open
If there is no socket that could receive a request from a client or peer, we know that nothing can be synchronized to us and no loop is possible.
This commit is contained in:
@@ -1474,9 +1474,9 @@ check_sync_loop(NCR_Instance inst, NTP_Packet *message, NTP_Local_Address *local
|
||||
NTP_Leap leap_status;
|
||||
uint32_t our_ref_id;
|
||||
|
||||
/* Check if our server may be enabled, i.e. a client or peer can actually
|
||||
/* Check if a server socket is open, i.e. a client or peer can actually
|
||||
be synchronised to us */
|
||||
if (REF_GetMode() != REF_ModeNormal)
|
||||
if (!NIO_IsServerSocketOpen())
|
||||
return 1;
|
||||
|
||||
/* Check if the source indicates that it is synchronised to our address
|
||||
|
||||
Reference in New Issue
Block a user