From 750c7a8548a03f5ad53267e256b24f4e1ab5d389 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 688fc1ec4..1cbd12a65 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -1897,7 +1897,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