Skip to content

Commit

Permalink
Refs #20650: Create initial connect for initial peers
Browse files Browse the repository at this point in the history
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
  • Loading branch information
cferreiragonz committed Jun 18, 2024
1 parent f8dc588 commit 7177aa1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/cpp/rtps/builtin/discovery/participant/PDPSimple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,17 @@ bool PDPSimple::create_dcps_participant_endpoints()

WriterAttributes watt = create_builtin_writer_attributes();
watt.endpoint.reliabilityKind = BEST_EFFORT;
watt.endpoint.remoteLocatorList = m_discovery.initialPeersList;
if (!m_discovery.initialPeersList.empty())
{
if (mp_RTPSParticipant->has_tcp_transports())
{
mp_RTPSParticipant->create_tcp_connections(m_discovery.initialPeersList);
}
else
{
watt.endpoint.remoteLocatorList = m_discovery.initialPeersList;
}
}

if (pattr.throughputController.bytesPerPeriod != UINT32_MAX && pattr.throughputController.periodMillisecs != 0)
{
Expand Down

0 comments on commit 7177aa1

Please sign in to comment.