Fix: only set the new_streams flag if a viewer is attached
[lttng-tools.git] / src / bin / lttng-relayd / main.c
index 688fc1ec48e478f929537a385adab19f089f5053..1cbd12a65ea5a955a1d1ee6514bcaeccdc1cca84 100644 (file)
@@ -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);
This page took 0.027225 seconds and 4 git commands to generate.