X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fust-consumer%2Fust-consumer.c;h=7d9444cd00b84300450e69676b6d42a668032e67;hp=8c15c7e135016098f3cb90a94923ec9eb3fc9d93;hb=a0cbdd2ea782afd7c263ff748dcca597095b61a0;hpb=a500c2570f64a51f0f22d7eb2c0555dd58786521 diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index 8c15c7e13..7d9444cd0 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -998,17 +998,13 @@ int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx, case LTTNG_CONSUMER_DESTROY_CHANNEL: { uint64_t key = msg.u.destroy_channel.key; - struct lttng_consumer_channel *channel; - - channel = consumer_find_channel(key); - if (!channel) { - ERR("UST consumer get channel key %" PRIu64 " not found", key); - ret_code = LTTNG_ERR_UST_CHAN_NOT_FOUND; - goto end_msg_sessiond; - } - - destroy_channel(channel); + /* + * Only called if streams have not been sent to stream + * manager thread. However, channel has been sent to + * channel manager thread. + */ + notify_thread_del_channel(ctx, key); goto end_msg_sessiond; } case LTTNG_CONSUMER_CLOSE_METADATA: