From c5141fe581679eedd5c38adeb431a8158a43d21f Mon Sep 17 00:00:00 2001 From: Julien Desfossez Date: Mon, 10 Feb 2014 18:52:29 -0500 Subject: [PATCH] Fix: only set the new_streams flag if a viewer is attached Signed-off-by: Julien Desfossez Signed-off-by: David Goulet --- src/bin/lttng-relayd/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.34.1