]> git.ipfire.org Git - thirdparty/chrony.git/commit
socket: make all sockets non-blocking
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 23 Jul 2019 13:09:24 +0000 (15:09 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 24 Jul 2019 08:21:14 +0000 (10:21 +0200)
commit4d26cfc92b878b8a90b60488361bd8cdba84903a
tree780dfd8ef63318624af829c05a7bbf63ff85ba4b
parentd78680912e6ea476257d533bf00362e2827f8997
socket: make all sockets non-blocking

All networking code in chronyd (NTP server/client, signd client, cmdmon
server) assumes sending a message will not block, but only the signd
client actually checks for a write event and only the NTP server
requests a non-blocking socket. The cmdmon server and NTP client
(if using one socket for all servers) might be blocked.

chronyc doesn't need a non-blocking socket, but it is not expected to
block as it sends only one message at a time.

Prefer dropped messages over blocking in all cases. Remove the
SCK_FLAG_NONBLOCK flag and make all sockets non-blocking.
ntp_io.c
socket.c
socket.h