X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Flive.c;h=9503ba470b70cd496291ec612f304c45446661d5;hp=bc0e4529a000a363a377a8de5cbd7cdbf48ddb82;hb=b5893d8e91f64257e58a50c7f5b413a5b31cf076;hpb=06079f15b69b07d67b84f9fe84b028624e68e333 diff --git a/src/bin/lttng-relayd/live.c b/src/bin/lttng-relayd/live.c index bc0e4529a..9503ba470 100644 --- a/src/bin/lttng-relayd/live.c +++ b/src/bin/lttng-relayd/live.c @@ -358,7 +358,7 @@ int make_viewer_streams(struct relay_session *session, } } else { if (!stream->closed || - !(((int64_t) (stream->prev_seq - stream->last_net_seq_num)) >= 0)) { + !(((int64_t) (stream->prev_data_seq - stream->last_net_seq_num)) >= 0)) { (*nb_total)++; } @@ -543,11 +543,6 @@ restart: revents = LTTNG_POLL_GETEV(&events, i); pollfd = LTTNG_POLL_GETFD(&events, i); - if (!revents) { - /* No activity for this FD (poll implementation). */ - continue; - } - /* Thread quit pipe has been closed. Killing thread. */ ret = check_thread_quit_pipe(pollfd, revents); if (ret) { @@ -835,6 +830,11 @@ int viewer_list_sessions(struct relay_connection *conn) health_code_update(); + if (session->connection_closed) { + /* Skip closed session */ + continue; + } + if (count >= buf_count) { struct lttng_viewer_session *newbuf; uint32_t new_buf_count = buf_count << 1; @@ -1995,11 +1995,6 @@ restart: health_code_update(); - if (!revents) { - /* No activity for this FD (poll implementation). */ - continue; - } - /* Thread quit pipe has been closed. Killing thread. */ ret = check_thread_quit_pipe(pollfd, revents); if (ret) {