From d046bdf70dd9e7662836ac747af43e724b494865 Mon Sep 17 00:00:00 2001 From: cferreiragonz Date: Thu, 5 Dec 2024 07:56:08 +0100 Subject: [PATCH] Refs #22055: Fix unique flows for TCP Signed-off-by: cferreiragonz --- src/cpp/rtps/participant/RTPSParticipantImpl.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/cpp/rtps/participant/RTPSParticipantImpl.cpp b/src/cpp/rtps/participant/RTPSParticipantImpl.cpp index f137468d6c4..56b202131e3 100644 --- a/src/cpp/rtps/participant/RTPSParticipantImpl.cpp +++ b/src/cpp/rtps/participant/RTPSParticipantImpl.cpp @@ -1737,7 +1737,15 @@ bool RTPSParticipantImpl::createAndAssociateReceiverswithEndpoint( // Set port on unicast locators for (Locator_t& loc : attributes.unicastLocatorList) { - loc.port = port; + // Set logical port only TCP locators + if (LOCATOR_KIND_TCPv4 == loc.kind || LOCATOR_KIND_TCPv6 == loc.kind) + { + IPLocator::setLogicalPort(loc, port); + } + else + { + loc.port = port; + } } // Try creating receiver resources