diff --git a/src/cpp/rtps/builtin/discovery/participant/PDP.cpp b/src/cpp/rtps/builtin/discovery/participant/PDP.cpp index 1c2259f8922..fbc1e5a4e38 100644 --- a/src/cpp/rtps/builtin/discovery/participant/PDP.cpp +++ b/src/cpp/rtps/builtin/discovery/participant/PDP.cpp @@ -593,7 +593,8 @@ void PDP::notify_and_maybe_ignore_new_participant( { { std::lock_guard cb_lock(callback_mtx_); - ParticipantDiscoveryInfo info(*pdata); + ParticipantProxyData* pdata_copy = get_participant_proxy_data(pdata->m_guid.guidPrefix); + ParticipantDiscoveryInfo info(*pdata_copy); info.status = ParticipantDiscoveryInfo::DISCOVERED_PARTICIPANT; diff --git a/src/cpp/rtps/builtin/discovery/participant/PDPClient.cpp b/src/cpp/rtps/builtin/discovery/participant/PDPClient.cpp index 82e758ec431..1bc7b79d1c3 100644 --- a/src/cpp/rtps/builtin/discovery/participant/PDPClient.cpp +++ b/src/cpp/rtps/builtin/discovery/participant/PDPClient.cpp @@ -489,7 +489,7 @@ void PDPClient::assignRemoteEndpoints( if (data_matches_with_prefix(svr.guidPrefix, *pdata)) { std::unique_lock lock(*getMutex()); - svr.proxy = pdata; + svr.proxy = get_participant_proxy_data(pdata->m_guid.guidPrefix); } } }