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) {
#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