Fix: kernel channel destroy on consumer if sent
[lttng-tools.git] / src / bin / lttng-sessiond / kernel.c
index b6b24a5a2b2b426fc78845bb8ca4bf7b1f16770a..faf35cc7fc8f8a42c927325a15a161bd69215148 100644 (file)
@@ -759,11 +759,11 @@ void kernel_destroy_session(struct ltt_kernel_session *ksess)
        DBG("Tearing down kernel session");
 
        /*
-        * Destroy channels on the consumer if in no output mode because the
-        * streams are in *no* monitor mode so we have to send a command to clean
-        * them up or else they leaked.
+        * Destroy channels on the consumer if at least one FD has been sent and we
+        * are in no output mode because the streams are in *no* monitor mode so we
+        * have to send a command to clean them up or else they leaked.
         */
-       if (!ksess->output_traces) {
+       if (!ksess->output_traces && ksess->consumer_fds_sent) {
                int ret;
                struct consumer_socket *socket;
                struct lttng_ht_iter iter;
This page took 0.024731 seconds and 5 git commands to generate.