From df11e790978b4506e66fd894b85bdbe392f7f042 Mon Sep 17 00:00:00 2001 From: Vignesh MURUGAPPAN Date: Tue, 10 Sep 2024 13:02:02 +0530 Subject: [PATCH 1/2] When the threshold is set to 1 in the configuration, the initial event sent for client 2 is always multicast rather than unicast. Signed-off-by: Vignesh MURUGAPPAN --- .../src/service_discovery_impl.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/implementation/service_discovery/src/service_discovery_impl.cpp b/implementation/service_discovery/src/service_discovery_impl.cpp index c38804575..f35d72d80 100644 --- a/implementation/service_discovery/src/service_discovery_impl.cpp +++ b/implementation/service_discovery/src/service_discovery_impl.cpp @@ -2376,12 +2376,7 @@ service_discovery_impl::handle_eventgroup_subscription( uint16_t its_first_port(0); its_subscriber = endpoint_definition::get( _first_address, _first_port, _is_first_reliable, _service, _instance); - if (!_is_first_reliable && - _info->get_multicast(its_first_address, its_first_port) && - _info->is_sending_multicast()) { // udp multicast - its_unreliable = endpoint_definition::get( - its_first_address, its_first_port, false, _service, _instance); - } else if (_is_first_reliable) { // tcp unicast + if (_is_first_reliable) { // tcp unicast its_reliable = its_subscriber; // check if TCP connection is established by client if (_ttl > 0 && !is_tcp_connected(_service, _instance, its_reliable)) { @@ -2406,12 +2401,7 @@ service_discovery_impl::handle_eventgroup_subscription( uint16_t its_second_port(0); its_subscriber = endpoint_definition::get( _second_address, _second_port, _is_second_reliable, _service, _instance); - if (!_is_second_reliable && - _info->get_multicast(its_second_address, its_second_port) && - _info->is_sending_multicast()) { // udp multicast - its_unreliable = endpoint_definition::get( - its_second_address, its_second_port, false, _service, _instance); - } else if (_is_second_reliable) { // tcp unicast + if (_is_second_reliable) { // tcp unicast its_reliable = its_subscriber; // check if TCP connection is established by client if (_ttl > 0 && !is_tcp_connected(_service, _instance, its_reliable)) { From ca777197555adc968d82fe48712bab1d38c6e3f3 Mon Sep 17 00:00:00 2001 From: Vignesh-Murugappan <155717346+Vignesh-Murugappan@users.noreply.github.com> Date: Tue, 10 Sep 2024 16:48:32 +0530 Subject: [PATCH 2/2] Update service_discovery_impl.cpp --- implementation/service_discovery/src/service_discovery_impl.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/implementation/service_discovery/src/service_discovery_impl.cpp b/implementation/service_discovery/src/service_discovery_impl.cpp index f35d72d80..63c030fbb 100644 --- a/implementation/service_discovery/src/service_discovery_impl.cpp +++ b/implementation/service_discovery/src/service_discovery_impl.cpp @@ -2373,7 +2373,6 @@ service_discovery_impl::handle_eventgroup_subscription( } else { boost::asio::ip::address its_first_address, its_second_address; if (ILLEGAL_PORT != _first_port) { - uint16_t its_first_port(0); its_subscriber = endpoint_definition::get( _first_address, _first_port, _is_first_reliable, _service, _instance); if (_is_first_reliable) { // tcp unicast @@ -2398,7 +2397,6 @@ service_discovery_impl::handle_eventgroup_subscription( } if (ILLEGAL_PORT != _second_port) { - uint16_t its_second_port(0); its_subscriber = endpoint_definition::get( _second_address, _second_port, _is_second_reliable, _service, _instance); if (_is_second_reliable) { // tcp unicast