From 279a776d7818c62509011ad7f881f4198ee5408f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Gonz=C3=A1lez?= Date: Fri, 2 Jul 2021 16:11:04 +0200 Subject: [PATCH] Fix segmentation fault on discovery server (#2033) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ricardo González Moreno --- .../builtin/discovery/participant/timedevent/DSClientEvent.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cpp/rtps/builtin/discovery/participant/timedevent/DSClientEvent.cpp b/src/cpp/rtps/builtin/discovery/participant/timedevent/DSClientEvent.cpp index dc04b154cd8..8310e1005fe 100644 --- a/src/cpp/rtps/builtin/discovery/participant/timedevent/DSClientEvent.cpp +++ b/src/cpp/rtps/builtin/discovery/participant/timedevent/DSClientEvent.cpp @@ -58,6 +58,7 @@ bool DSClientEvent::event() // Iterate over remote servers to check for new unmatched servers ParticipantProxyData* part_proxy_data; + std::unique_lock lock(*mp_PDP->getMutex()); for (auto server: mp_PDP->remote_server_attributes()) { // Get the participant proxy data of the server