X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer-stream.c;h=745de050d6dd4f7c805d37ec2f1221092fed17ac;hb=1501a7f32e1abf3e805053d4241c9796882d56bc;hp=422dd0daa55929a7058e163977bcc05d7bba371e;hpb=50adc26400482c07210afcda8ef1d3322f75871d;p=lttng-tools.git diff --git a/src/common/consumer-stream.c b/src/common/consumer-stream.c index 422dd0daa..745de050d 100644 --- a/src/common/consumer-stream.c +++ b/src/common/consumer-stream.c @@ -342,8 +342,10 @@ int consumer_stream_write_index(struct lttng_consumer_stream *stream, rcu_read_lock(); relayd = consumer_find_relayd(stream->net_seq_idx); if (relayd) { + pthread_mutex_lock(&relayd->ctrl_sock_mutex); ret = relayd_send_index(&relayd->control_sock, index, stream->relayd_stream_id, stream->next_net_seq_num - 1); + pthread_mutex_unlock(&relayd->ctrl_sock_mutex); } else { ssize_t size_ret;