From: Andrew Bays Date: Fri, 19 Oct 2018 14:05:44 +0000 (-0400) Subject: Handled interrupted socket reads X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=f4e7eb5fb59872c1a8b1e1f5314249489c314fb0;p=collectd.git Handled interrupted socket reads --- diff --git a/src/connectivity.c b/src/connectivity.c index ec2f7e38..c470c995 100644 --- a/src/connectivity.c +++ b/src/connectivity.c @@ -558,6 +558,12 @@ static int read_event(int nl, int (*msg_handler)(struct nlmsghdr *)) { continue; } + if (errno == EINTR) + { + // Interrupt, so just return + return 0; + } + /* Anything else is an error */ ERROR("connectivity plugin: read_event: Error recv: %d", status); return status;