From 4c72e4667eff815344f825e335a1bc2f792b3c56 Mon Sep 17 00:00:00 2001 From: guogang Date: Sun, 3 Oct 2021 20:58:37 -0700 Subject: [PATCH] Fixed the issue to initialize an EndpointInfo instance in payload manager. PiperOrigin-RevId: 400624671 --- cpp/core/internal/payload_manager.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cpp/core/internal/payload_manager.cc b/cpp/core/internal/payload_manager.cc index 4c877edd..403be7e0 100644 --- a/cpp/core/internal/payload_manager.cc +++ b/cpp/core/internal/payload_manager.cc @@ -366,6 +366,7 @@ void PayloadManager::SendPayload(ClientProxy* client, payload_total_size = -1; break; } + auto executor = GetOutgoingPayloadExecutor(payload.GetType()); // The |executor| will be null if the payload is of a type we cannot work // with. This should never be reached since the ServiceControllerRouter has @@ -1170,10 +1171,11 @@ PayloadManager::PendingPayload::PendingPayload( // failures. Any of these situations will cause endpoint to be marked as // unavailable. for (const auto& id : endpoint_ids) { - endpoints_.emplace(id, EndpointInfo{ - .id = id, - .status{EndpointInfo::Status::kAvailable}, - }); + EndpointInfo endpoint_info{}; + endpoint_info.id = id; + endpoint_info.status.Set(EndpointInfo::Status::kAvailable); + + endpoints_.emplace(id, std::move(endpoint_info)); } }