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