From 9f0fee3fd9dbc61c30b09aeb5fc33c7042baaa77 Mon Sep 17 00:00:00 2001 From: Davide Faconti Date: Thu, 1 Feb 2024 14:30:51 +0100 Subject: [PATCH] fix dead-lock --- data_tamer_cpp/include/data_tamer/channel.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/data_tamer_cpp/include/data_tamer/channel.hpp b/data_tamer_cpp/include/data_tamer/channel.hpp index beab96f..63ad3f1 100644 --- a/data_tamer_cpp/include/data_tamer/channel.hpp +++ b/data_tamer_cpp/include/data_tamer/channel.hpp @@ -415,9 +415,8 @@ inline void LoggedValue::set(const T& val, bool auto_enable) { if (auto channel = channel_.lock()) { - std::lock_guard const lock(channel->writeMutex()); value_ = val; - if (!enabled_ && auto_enable) + if (auto_enable) { channel->setEnabled(id_, true); enabled_ = true;