From: Julien Desfossez Date: Mon, 24 Feb 2014 18:02:19 +0000 (-0500) Subject: Fix: wrong condition on startup for low-activity streams X-Git-Tag: v2.4.0~26 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8ffc312f15875c690bb99d556ae4e07bb5fa4857;p=lttng-tools.git Fix: wrong condition on startup for low-activity streams If we only received and sent one index, we should not be in the retry condition. The rstream->total_index_received == vstream->last_sent_index is checked before. Signed-off-by: Julien Desfossez Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-relayd/live.c b/src/bin/lttng-relayd/live.c index c60f7e4c9..468a7e587 100644 --- a/src/bin/lttng-relayd/live.c +++ b/src/bin/lttng-relayd/live.c @@ -1206,7 +1206,7 @@ static int check_index_status(struct relay_viewer_stream *vstream, index->status = htobe32(LTTNG_VIEWER_INDEX_INACTIVE); index->timestamp_end = htobe64(rstream->beacon_ts_end); goto index_ready; - } else if (rstream->total_index_received <= vstream->last_sent_index + } else if (rstream->total_index_received < vstream->last_sent_index && !vstream->close_write_flag) { /* * Reader and writer are working in the same tracefile, so we care