X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fconsumer.c;h=8b43257bd134987a3d0811320276010b724579b3;hp=242b05b3d6bb9c65939ea72a900a84fa74d382b7;hb=4bb94b7597f56f5200ebd6a88e906488172241fb;hpb=4dbc372b53ef1ac713497164e7a8b92100db7ae2 diff --git a/src/common/consumer.c b/src/common/consumer.c index 242b05b3d..8b43257bd 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -1888,12 +1888,15 @@ restart: lttng_ustconsumer_on_stream_hangup(stream); /* We just flushed the stream now read it. */ - len = ctx->on_buffer_ready(stream, ctx); - /* It's ok to have an unavailable sub-buffer */ - if (len < 0 && len != -EAGAIN) { - rcu_read_unlock(); - goto end; - } + do { + len = ctx->on_buffer_ready(stream, ctx); + /* + * We don't check the return value here since if we get + * a negative len, it means an error occured thus we + * simply remove it from the poll set and free the + * stream. + */ + } while (len > 0); } lttng_poll_del(&events, stream->wait_fd);