aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ntp_server.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ntp_server.c b/src/ntp_server.c
index 0705c7fc9..8e4aca6bd 100644
--- a/src/ntp_server.c
+++ b/src/ntp_server.c
@@ -112,7 +112,9 @@ ntp_server_check(struct ntp_server *ntp, struct timeval *tout)
FD_SET(ntp->fd, &rdfds);
fdmax = ntp->fd;
- select(fdmax + 1, &rdfds,NULL, NULL, tout);
+ if (select(fdmax + 1, &rdfds,NULL, NULL, tout) <= 0)
+ return false;
+
if (FD_ISSET(ntp->fd, &rdfds)) {
if (!ntp_server_handle(ntp)) {
g_debug("unable to send timing response\n");