From: Mathieu Desnoyers Date: Wed, 11 Apr 2012 22:06:08 +0000 (-0400) Subject: Fix consumer lttng_consumer_poll_socket poll revents check bug X-Git-Tag: v2.0.1~8 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3654a23ff4d32ecb2b70142dcfd0328df2fe73fb;p=lttng-tools.git Fix consumer lttng_consumer_poll_socket poll revents check bug Was causing the sessiond to fail to receive streams under heavy load, because this test needs to be done with a mask rather than equality. Testing equality was failing as soon as POLLPRI (or any other flag) was set. Signed-off-by: Mathieu Desnoyers --- diff --git a/src/common/consumer.c b/src/common/consumer.c index f81de8d55..74a9b0ad2 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -562,7 +562,7 @@ restart: perror("Poll error"); goto exit; } - if (consumer_sockpoll[0].revents == POLLIN) { + if (consumer_sockpoll[0].revents & POLLIN) { DBG("consumer_should_quit wake up"); goto exit; }