From: Julien Desfossez Date: Mon, 10 Feb 2014 23:52:29 +0000 (-0500) Subject: Fix: only set the new_streams flag if a viewer is attached X-Git-Tag: v2.5.0-rc1~184 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=c5141fe581679eedd5c38adeb431a8158a43d21f Fix: only set the new_streams flag if a viewer is attached Signed-off-by: Julien Desfossez Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index 482ca3e75..b76d07880 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -2033,7 +2033,9 @@ int relay_streams_sent(struct lttcomm_relayd_hdr *recv_hdr, /* * Inform the viewer that there are new streams in the session. */ - uatomic_set(&conn->session->new_streams, 1); + if (conn->session->viewer_refcount) { + uatomic_set(&conn->session->new_streams, 1); + } reply.ret_code = htobe32(LTTNG_OK); send_ret = conn->sock->ops->sendmsg(conn->sock, &reply, sizeof(reply), 0);