From 65a2390a852714bb69794301f3c44d108c100fab Mon Sep 17 00:00:00 2001 From: Donghee Ye Date: Fri, 16 Nov 2018 19:25:37 +0900 Subject: [PATCH] Fix guard condition trigger error --- rmw_fastrtps_shared_cpp/src/types/guard_condition.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/rmw_fastrtps_shared_cpp/src/types/guard_condition.hpp b/rmw_fastrtps_shared_cpp/src/types/guard_condition.hpp index b4a08cda1..6f0ab0299 100644 --- a/rmw_fastrtps_shared_cpp/src/types/guard_condition.hpp +++ b/rmw_fastrtps_shared_cpp/src/types/guard_condition.hpp @@ -72,6 +72,7 @@ class GuardCondition bool getHasTriggered() { + std::lock_guard lock(internalMutex_); bool ret = hasTriggered_; hasTriggered_ = false; return ret;