}
} 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)++;
}
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;
if (closed) {
send_streams = 0;
response.streams_count = 0;
- response.status = htobe32(LTTNG_VIEWER_NEW_STREAMS_HUP);
+ response.status = htobe32(LTTNG_VIEWER_ATTACH_UNK);
goto send_reply;
}