From 50f0058264e3c3df46ff1f68036d68f59ed12af1 Mon Sep 17 00:00:00 2001 From: hai007 Date: Thu, 4 Feb 2021 13:48:58 -0800 Subject: [PATCH] Roll forward up to cl/355444256. --- cpp/core/internal/base_pcp_handler.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cpp/core/internal/base_pcp_handler.cc b/cpp/core/internal/base_pcp_handler.cc index c9fcb3bd..258012c7 100644 --- a/cpp/core/internal/base_pcp_handler.cc +++ b/cpp/core/internal/base_pcp_handler.cc @@ -363,8 +363,7 @@ Status BasePcpHandler::RequestConnection(ClientProxy* client, ConnectImplResult connect_impl_result; for (auto connect_endpoint : discovered_endpoints) { - if (!MediumSupportedByClientOptions(connect_endpoint->medium, - client->GetDiscoveryOptions())) + if (!MediumSupportedByClientOptions(connect_endpoint->medium, options)) continue; connect_impl_result = ConnectImpl(client, connect_endpoint); if (connect_impl_result.status.Ok()) { @@ -389,7 +388,7 @@ Status BasePcpHandler::RequestConnection(ClientProxy* client, // endpoint about ourselves. Exception write_exception = WriteConnectionRequestFrame( channel.get(), client->GetLocalEndpointId(), info.endpoint_info, nonce, - GetSupportedConnectionMediumsByPriority(client->GetDiscoveryOptions())); + GetSupportedConnectionMediumsByPriority(options)); if (!write_exception.Ok()) { NEARBY_LOG(INFO, "Failed to send connection request: id=%s", endpoint_id.c_str());