Skip to content

Commit

Permalink
fix dead-lock
Browse files Browse the repository at this point in the history
  • Loading branch information
facontidavide committed Feb 1, 2024
1 parent 8262a9c commit 9f0fee3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions data_tamer_cpp/include/data_tamer/channel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,8 @@ inline void LoggedValue<T>::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;
Expand Down

0 comments on commit 9f0fee3

Please sign in to comment.