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.1.0-rc1~150 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=9354f2497de36d21ca5d78416041cff22517b35b 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; }