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.4.0-rc5~15 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=750c7a8548a03f5ad53267e256b24f4e1ab5d389;p=lttng-tools.git 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 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);