Skip to content

Commit

Permalink
fix notification lost
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
  • Loading branch information
Chen Lihui committed Nov 14, 2022
1 parent cbe3abb commit 744524a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cpp/fastdds/core/condition/WaitSetImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ ReturnCode_t WaitSetImpl::attach_condition(
// Should wake_up when adding a new triggered condition
if (is_waiting_ && condition.get_trigger_value())
{
wake_up();
cond_.notify_one();
}
}
}
Expand Down Expand Up @@ -156,6 +156,7 @@ ReturnCode_t WaitSetImpl::get_conditions(

void WaitSetImpl::wake_up()
{
std::lock_guard<std::mutex> guard(mutex_);
cond_.notify_one();
}

Expand Down

0 comments on commit 744524a

Please sign in to comment.