Skip to content

Commit

Permalink
Refs #20629: Ping always Remote_servers and initial ping after list u…
Browse files Browse the repository at this point in the history
…pdate

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
  • Loading branch information
cferreiragonz committed Apr 23, 2024
1 parent b764bf3 commit dcea616
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/cpp/rtps/builtin/discovery/participant/PDPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -807,11 +807,8 @@ void PDPClient::announceParticipantState(
// This is because we no longer use the GUID to match servers, so we cannot discern which servers are connected
// and which are not. We cannot map servers in m_DiscoveryServers to connected_servers_.

// Ping not-connected servers
if (connected_servers_.size() < mp_builtin->m_DiscoveryServers.size())
{
locators = mp_builtin->m_DiscoveryServers;
}
// Ping always not-connected servers. This is done to ensure ping is sent to new servers after a list update.
locators = mp_builtin->m_DiscoveryServers;

// Announce liveliness (lease duration) to all servers
if (!_serverPing)
Expand Down Expand Up @@ -862,6 +859,10 @@ void PDPClient::update_remote_servers_list()

endpoints->reader.reader_->enableMessagesFromUnkownWriters(true);
}
// Make at least one ping to the new servers.
_serverPing = true;
WriteParams __wp = WriteParams::write_params_default();
announceParticipantState(false, false, __wp);
mp_sync->restart_timer();
}

Expand Down

0 comments on commit dcea616

Please sign in to comment.