mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -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:
8
ntp_io.c
8
ntp_io.c
@@ -329,6 +329,14 @@ NIO_IsServerSocket(int sock_fd)
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
int
|
||||
NIO_IsServerSocketOpen(void)
|
||||
{
|
||||
return server_sock_fd4 != INVALID_SOCK_FD || server_sock_fd6 != INVALID_SOCK_FD;
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
int
|
||||
NIO_IsServerConnectable(NTP_Remote_Address *remote_addr)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user