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