X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Flttng-live%2Flttng-live-comm.c;h=8cdac9188577bc95df8f0dbbc2855ffd80c6628a;hp=8059b338b095dd4672021946ae497b3f8a45f7dd;hb=6baf4b8ee0e699b92dc697e01287d56577bd4397;hpb=b93293f64299d1d7ef7a55a67e42b27fa2262f19 diff --git a/formats/lttng-live/lttng-live-comm.c b/formats/lttng-live/lttng-live-comm.c index 8059b338..8cdac918 100644 --- a/formats/lttng-live/lttng-live-comm.c +++ b/formats/lttng-live/lttng-live-comm.c @@ -567,10 +567,11 @@ restart: id = g_array_index(ctx->session_ids, uint64_t, i); ret = lttng_live_get_new_streams(ctx, id); printf_verbose("Asking for new streams returns %d\n", ret); + if (lttng_live_should_quit()) { + ret = -1; + goto end; + } if (ret < 0) { - if (lttng_live_should_quit()) { - goto end; - } if (ret == -LTTNG_VIEWER_NEW_STREAMS_HUP) { printf_verbose("Session %" PRIu64 " closed\n", id); @@ -1756,6 +1757,7 @@ int lttng_live_read(struct lttng_live_ctx *ctx) } ret = ask_new_streams(ctx); if (ret < 0) { + ret = 0; goto end_free; } if (!ctx->session->stream_count) {