clickhouse-keeper: fix implementation of server with poll()

This commit is contained in:
Andy Fiddaman 2023-07-31 17:45:54 +01:00
parent 5d40e7ccb7
commit f9e0a202a7

View File

@ -175,10 +175,12 @@ struct SocketInterruptablePollWrapper
}
while (rc < 0 && errno == POCO_EINTR);
if (rc >= 1 && poll_buf[0].revents & POLLIN)
socket_ready = true;
if (rc >= 2 && poll_buf[1].revents & POLLIN)
fd_ready = true;
if (rc >= 1) {
if (poll_buf[0].revents & POLLIN)
socket_ready = true;
if (poll_buf[1].revents & POLLIN)
fd_ready = true;
}
#endif
}