From 1e5416bdcb49fb65aefcbc060ef47e584302bf93 Mon Sep 17 00:00:00 2001 From: hai007 Date: Tue, 4 May 2021 16:28:47 -0700 Subject: [PATCH] Internal change PiperOrigin-RevId: 372018877 --- cpp/core/internal/endpoint_manager.cc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/cpp/core/internal/endpoint_manager.cc b/cpp/core/internal/endpoint_manager.cc index a31aefb4..d0d4d0c0 100644 --- a/cpp/core/internal/endpoint_manager.cc +++ b/cpp/core/internal/endpoint_manager.cc @@ -409,12 +409,12 @@ void EndpointManager::RegisterEndpoint(ClientProxy* client, absl::Milliseconds(options.keep_alive_interval_millis); absl::Duration keep_alive_timeout = absl::Milliseconds(options.keep_alive_timeout_millis); - NEARBY_LOG(INFO, - "Registering endpoint %s for client %d with keep-alive frame as " - "interval=%s, timeout=%s", - endpoint_id.c_str(), client->GetClientId(), - absl::FormatDuration(keep_alive_interval).c_str(), - absl::FormatDuration(keep_alive_timeout).c_str()); + NEARBY_LOGS(INFO) << "Registering endpoint " << endpoint_id.c_str() + << " for client " << client->GetClientId() + << " with keep-alive frame as interval=" + << absl::FormatDuration(keep_alive_interval).c_str() + << ", timeout=" + << absl::FormatDuration(keep_alive_timeout).c_str(); // Pass ownership of channel to EndpointChannelManager NEARBY_LOG(INFO, "Registering endpoint with channel manager: id=%s", @@ -487,12 +487,12 @@ void EndpointManager::UnregisterEndpoint(ClientProxy* client, const std::string& endpoint_id) { NEARBY_LOG(ERROR, "UnregisterEndpoint for endpoint %s", endpoint_id.c_str()); CountDownLatch latch(1); - RunOnEndpointManagerThread("unregister-endpoint", [this, client, endpoint_id, - &latch]() { - RemoveEndpoint(client, endpoint_id, - client->IsConnectedToEndpoint(endpoint_id)); - latch.CountDown(); - }); + RunOnEndpointManagerThread( + "unregister-endpoint", [this, client, endpoint_id, &latch]() { + RemoveEndpoint(client, endpoint_id, + client->IsConnectedToEndpoint(endpoint_id)); + latch.CountDown(); + }); latch.Await(); }