check polled count

This commit is contained in:
John
2021-11-13 14:08:47 +01:00
parent 3970ac911b
commit 3f40162479
+2 -2
View File
@@ -124,8 +124,8 @@ void Connection::run() {
if (ret != 0) { if (ret != 0) {
#ifdef HAVE_PPOLL #ifdef HAVE_PPOLL
// new data from notify // new data from notify
if (ret < 0 || (fds[0].revents & (POLLIN | POLLERR | POLLHUP | POLLRDHUP)) if (ret < 0 || (ret > 0 && ((fds[0].revents & (POLLIN | POLLERR | POLLHUP | POLLRDHUP))
|| (fds[1].revents & (POLLERR | POLLHUP))) { || (fds[1].revents & (POLLERR | POLLHUP))))) {
break; break;
} }
// new data from socket // new data from socket