X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer-stream.c;h=2bb5ce7e8adee8a235d9b5b6783b66fe5ecef7fd;hb=3c4599b9a5c12ceff19368c6cd51e01d81824726;hp=717e0a7351a49461e4702c872fc91914b8efaffe;hpb=5e41ebe1bcc918cb5ff5d97489ccfbae0b7086a3;p=lttng-tools.git diff --git a/src/common/consumer-stream.c b/src/common/consumer-stream.c index 717e0a735..2bb5ce7e8 100644 --- a/src/common/consumer-stream.c +++ b/src/common/consumer-stream.c @@ -135,6 +135,14 @@ void consumer_stream_close(struct lttng_consumer_stream *stream) stream->out_fd = -1; } + if (stream->index_fd >= 0) { + ret = close(stream->index_fd); + if (ret) { + PERROR("close stream index_fd"); + } + stream->index_fd = -1; + } + /* Check and cleanup relayd if needed. */ rcu_read_lock(); relayd = consumer_find_relayd(stream->net_seq_idx);