From d5a6499064ed1d9106b21309bafa6cdd0eee8dee Mon Sep 17 00:00:00 2001 From: cferreiragonz Date: Wed, 20 Mar 2024 10:10:46 +0100 Subject: [PATCH] Refs #20628: Check interface changes before creating new send resources Signed-off-by: cferreiragonz --- src/cpp/rtps/participant/RTPSParticipantImpl.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/cpp/rtps/participant/RTPSParticipantImpl.cpp b/src/cpp/rtps/participant/RTPSParticipantImpl.cpp index 6c50486ec77..4b75c4b195e 100644 --- a/src/cpp/rtps/participant/RTPSParticipantImpl.cpp +++ b/src/cpp/rtps/participant/RTPSParticipantImpl.cpp @@ -1485,9 +1485,12 @@ void RTPSParticipantImpl::update_attributes( local_participant_proxy_data->default_locators.add_unicast_locator(locator); } - createSenderResources(m_att.builtin.metatrafficMulticastLocatorList); - createSenderResources(m_att.builtin.metatrafficUnicastLocatorList); - createSenderResources(m_att.defaultUnicastLocatorList); + if (local_interfaces_changed) + { + createSenderResources(m_att.builtin.metatrafficMulticastLocatorList); + createSenderResources(m_att.builtin.metatrafficUnicastLocatorList); + createSenderResources(m_att.defaultUnicastLocatorList); + } if (!modified_locators.empty()) { createSenderResources(modified_locators);