X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fconsumer.c;h=0035aae82d51e1afaa538fddfeb6e7463bfa53db;hp=d192d7a5194cb6b439a33ebd68e38a2ce5560629;hb=fd20dac985126e84929d657f5a1042222c7d5017;hpb=dbe23f452a025e8f42bdbb41e30a4a6257aa821c diff --git a/src/common/consumer.c b/src/common/consumer.c index d192d7a51..0035aae82 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -2212,6 +2212,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"); @@ -2782,10 +2787,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");