Skip to content

Commit

Permalink
Fix live-comm: only apply retry timeout for already seen inactive ind…
Browse files Browse the repository at this point in the history
…exes.

Tested-by: Anton Smyk <anton.smyk@itiviti.com>
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
  • Loading branch information
PSRCode authored and jgalar committed Jul 27, 2017
1 parent de417d0 commit 4594dbd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions formats/lttng-live/lttng-live-comm.c
Expand Up @@ -1033,6 +1033,13 @@ int get_next_index(struct lttng_live_ctx *ctx,
switch (be32toh(rp->status)) {
case LTTNG_VIEWER_INDEX_INACTIVE:
printf_verbose("get_next_index: inactive\n");

if (index->ts_cycles.timestamp_end ==
be64toh(rp->timestamp_end)) {
/* Already seen this timestamp. */
(void) poll(NULL, 0, ACTIVE_POLL_DELAY);
}

memset(index, 0, sizeof(struct packet_index));
index->ts_cycles.timestamp_end = be64toh(rp->timestamp_end);
*stream_id = be64toh(rp->stream_id);
Expand Down

0 comments on commit 4594dbd

Please sign in to comment.