From 3f40162479fe6d3cb8fbb34c174aed9da035b22b Mon Sep 17 00:00:00 2001 From: John Date: Sat, 13 Nov 2021 14:08:47 +0100 Subject: [PATCH] check polled count --- src/ebusd/network.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ebusd/network.cpp b/src/ebusd/network.cpp index dbf1ab38..df84aca6 100644 --- a/src/ebusd/network.cpp +++ b/src/ebusd/network.cpp @@ -124,8 +124,8 @@ void Connection::run() { if (ret != 0) { #ifdef HAVE_PPOLL // new data from notify - if (ret < 0 || (fds[0].revents & (POLLIN | POLLERR | POLLHUP | POLLRDHUP)) - || (fds[1].revents & (POLLERR | POLLHUP))) { + if (ret < 0 || (ret > 0 && ((fds[0].revents & (POLLIN | POLLERR | POLLHUP | POLLRDHUP)) + || (fds[1].revents & (POLLERR | POLLHUP))))) { break; } // new data from socket