Skip to content

Commit a79fae1

Browse files
When the threshold is set to 1 in the configuration, the initial event sent for client 2 is always multicast rather than unicast. (#763)
* 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 <vignesh.murugappan@valeo.com> * Update service_discovery_impl.cpp --------- Signed-off-by: Vignesh MURUGAPPAN <vignesh.murugappan@valeo.com>
1 parent 2cf2c35 commit a79fae1

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

implementation/service_discovery/src/service_discovery_impl.cpp

+2-14
Original file line numberDiff line numberDiff line change
@@ -2450,15 +2450,9 @@ void service_discovery_impl::handle_eventgroup_subscription(
24502450
} else {
24512451
boost::asio::ip::address its_first_address, its_second_address;
24522452
if (ILLEGAL_PORT != _first_port) {
2453-
uint16_t its_first_port(0);
24542453
its_subscriber = endpoint_definition::get(
24552454
_first_address, _first_port, _is_first_reliable, _service, _instance);
2456-
if (!_is_first_reliable &&
2457-
_info->get_multicast(its_first_address, its_first_port) &&
2458-
_info->is_sending_multicast()) { // udp multicast
2459-
its_unreliable = endpoint_definition::get(
2460-
its_first_address, its_first_port, false, _service, _instance);
2461-
} else if (_is_first_reliable) { // tcp unicast
2455+
if (_is_first_reliable) { // tcp unicast
24622456
its_reliable = its_subscriber;
24632457
// check if TCP connection is established by client
24642458
if (_ttl > 0 && !is_tcp_connected(_service, _instance, its_reliable)) {
@@ -2480,15 +2474,9 @@ void service_discovery_impl::handle_eventgroup_subscription(
24802474
}
24812475

24822476
if (ILLEGAL_PORT != _second_port) {
2483-
uint16_t its_second_port(0);
24842477
its_subscriber = endpoint_definition::get(
24852478
_second_address, _second_port, _is_second_reliable, _service, _instance);
2486-
if (!_is_second_reliable &&
2487-
_info->get_multicast(its_second_address, its_second_port) &&
2488-
_info->is_sending_multicast()) { // udp multicast
2489-
its_unreliable = endpoint_definition::get(
2490-
its_second_address, its_second_port, false, _service, _instance);
2491-
} else if (_is_second_reliable) { // tcp unicast
2479+
if (_is_second_reliable) { // tcp unicast
24922480
its_reliable = its_subscriber;
24932481
// check if TCP connection is established by client
24942482
if (_ttl > 0 && !is_tcp_connected(_service, _instance, its_reliable)) {

0 commit comments

Comments
 (0)