diff --git a/src/cpp/rtps/network/ReceiverResource.cpp b/src/cpp/rtps/network/ReceiverResource.cpp index 35449dc759d..1762c30f340 100644 --- a/src/cpp/rtps/network/ReceiverResource.cpp +++ b/src/cpp/rtps/network/ReceiverResource.cpp @@ -51,7 +51,7 @@ ReceiverResource::ReceiverResource( }; LocatorMapsToManagedChannel = [&transport, locator](const Locator_t& locatorToCheck) -> bool { - return transport.DoInputLocatorsMatch(locator, locatorToCheck); + return locator.kind == locatorToCheck.kind && transport.DoInputLocatorsMatch(locator, locatorToCheck); }; }