X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fconsumer.c;h=b0b926bb01a1f65c58c9d25da47bc980b4125e83;hp=c741a1b8ec438925bf9da59edeef65b47652b444;hb=9d0482e7fb70c4deaebe57872cbd75a6a1c213fb;hpb=7fa2082ed250230b7823e01b144aa6b580d4b2f5 diff --git a/src/common/consumer.c b/src/common/consumer.c index c741a1b8e..b0b926bb0 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -2181,14 +2181,6 @@ void *consumer_thread_metadata_poll(void *data) DBG("Metadata main loop started"); while (1) { - health_code_update(); - - /* Only the metadata pipe is set */ - if (LTTNG_POLL_GETNB(&events) == 0 && consumer_quit == 1) { - err = 0; /* All is OK */ - goto end; - } - restart: health_code_update(); health_poll_entry(); @@ -2203,7 +2195,10 @@ restart: ERR("Poll EINTR catched"); goto restart; } - goto error; + if (LTTNG_POLL_GETNB(&events) == 0) { + err = 0; /* All is OK */ + } + goto end; } nb_fd = ret; @@ -2336,7 +2331,6 @@ restart: /* All is OK */ err = 0; -error: end: DBG("Metadata poll thread exiting"); @@ -2759,14 +2753,6 @@ void *consumer_thread_channel_poll(void *data) DBG("Channel main loop started"); while (1) { - health_code_update(); - - /* Only the channel pipe is set */ - if (LTTNG_POLL_GETNB(&events) == 0 && consumer_quit == 1) { - err = 0; /* All is OK */ - goto end; - } - restart: health_code_update(); DBG("Channel poll wait"); @@ -2781,6 +2767,9 @@ restart: ERR("Poll EINTR catched"); goto restart; } + if (LTTNG_POLL_GETNB(&events) == 0) { + err = 0; /* All is OK */ + } goto end; }