The returned nb_fd value is the number of FD ready for the requested I/O
so having and revents set to 0 is possible since not all fd are ready
thus making this check irrelevant and actually ressource consuming.
Signed-off-by: David Goulet <dgoulet@efficios.com>
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) {
- continue;
- }
-
if (pollfd == lttng_pipe_get_readfd(ctx->consumer_metadata_pipe)) {
if (revents & (LPOLLERR | LPOLLHUP )) {
DBG("Metadata thread pipe hung up");