Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When the threshold is set to 1 in the configuration, the initial event sent for client 2 is always multicast rather than unicast. #763

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions implementation/service_discovery/src/service_discovery_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2373,15 +2373,9 @@ 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 &&
_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)) {
Expand All @@ -2403,15 +2397,9 @@ 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 &&
_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)) {
Expand Down