Commit 59a5b000 authored by Max Kellermann's avatar Max Kellermann

ntp_server: check for select() failures

Fix freeze after signal was handled.
parent d49a2ccb
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment