X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer.c;h=aec7ba693dae55676f79ced4bc6ff0a04038f43c;hb=f056734385a493c37e45d1d5bcd65718dcac4f5d;hp=b5f9ae92e576f2a76107f6920ec999d04a027b72;hpb=eb5043b3d5d7b5bd1417a81de31f9998abd08d6c;p=lttng-tools.git diff --git a/src/common/consumer.c b/src/common/consumer.c index b5f9ae92e..aec7ba693 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -2210,6 +2210,11 @@ restart: revents = LTTNG_POLL_GETEV(&events, i); pollfd = LTTNG_POLL_GETFD(&events, i); + if (!revents) { + /* No activity for this FD (poll implementation). */ + continue; + } + if (pollfd == lttng_pipe_get_readfd(ctx->consumer_metadata_pipe)) { if (revents & (LPOLLERR | LPOLLHUP )) { DBG("Metadata thread pipe hung up"); @@ -2780,10 +2785,11 @@ restart: revents = LTTNG_POLL_GETEV(&events, i); pollfd = LTTNG_POLL_GETFD(&events, i); - /* Just don't waste time if no returned events for the fd */ if (!revents) { + /* No activity for this FD (poll implementation). */ continue; } + if (pollfd == ctx->consumer_channel_pipe[0]) { if (revents & (LPOLLERR | LPOLLHUP)) { DBG("Channel thread pipe hung up");