Skip to content

Commit 4624156

Browse files
authored
Fix update remote server locators when enabling statistics (#2601)
* Refs #14091: fix update remote server locators when enabling statistics Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com> * Refs #14091: call createSenderResources only if there are modified locators Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
1 parent 56f9f5a commit 4624156

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/cpp/rtps/participant/RTPSParticipantImpl.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,6 +1264,7 @@ void RTPSParticipantImpl::update_attributes(
12641264
{
12651265
update_pdp = true;
12661266
std::vector<GUID_t> modified_servers;
1267+
LocatorList_t modified_locators;
12671268
// Check that the remote servers list is consistent: all the already known remote servers must be included in
12681269
// the list and either new remote servers are added or remote server listening locator is modified.
12691270
for (auto existing_server : m_att.builtin.discovery_config.m_DiscoveryServers)
@@ -1287,6 +1288,7 @@ void RTPSParticipantImpl::update_attributes(
12871288
if (!locator_contained)
12881289
{
12891290
modified_servers.emplace_back(incoming_server.GetParticipant());
1291+
modified_locators.push_back(incoming_locator);
12901292
logInfo(RTPS_QOS_CHECK,
12911293
"DS Server: " << incoming_server.guidPrefix << " has modified its locators: "
12921294
<< incoming_locator << " being added")
@@ -1333,6 +1335,10 @@ void RTPSParticipantImpl::update_attributes(
13331335
createSenderResources(m_att.builtin.metatrafficMulticastLocatorList);
13341336
createSenderResources(m_att.builtin.metatrafficUnicastLocatorList);
13351337
createSenderResources(m_att.defaultUnicastLocatorList);
1338+
if (!modified_locators.empty())
1339+
{
1340+
createSenderResources(modified_locators);
1341+
}
13361342

13371343
// Update remote servers list
13381344
if (m_att.builtin.discovery_config.discoveryProtocol == DiscoveryProtocol::CLIENT ||

0 commit comments

Comments
 (0)