From 407222b104f5abc07595b07fb32e76332cd5c7e9 Mon Sep 17 00:00:00 2001 From: hai007 Date: Tue, 28 Jun 2022 12:56:34 -0700 Subject: [PATCH] Fix a BWU revert logic error for BWU initiator PiperOrigin-RevId: 457799119 --- connections/implementation/bwu_manager.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/connections/implementation/bwu_manager.cc b/connections/implementation/bwu_manager.cc index f15bbba4..45ee3726 100644 --- a/connections/implementation/bwu_manager.cc +++ b/connections/implementation/bwu_manager.cc @@ -1123,7 +1123,10 @@ void BwuManager::ProcessUpgradeFailureEvent( channel ? channel->GetServiceId() : std::string(kUnknownServiceId); // Revert the existing upgrade medium for now. if (GetBwuMediumForEndpoint(endpoint_id) != Medium::UNKNOWN_MEDIUM) { - RevertBwuMediumForEndpoint(service_id, endpoint_id); + // This is the BWU initiator, so append "_UPGRADE" to service_id. + // Otherwise the Revert logic won't call into platform medium layer code. + std::string upgrade_service_id = WrapInitiatorUpgradeServiceId(service_id); + RevertBwuMediumForEndpoint(upgrade_service_id, endpoint_id); } // Loop through the ordered list of upgrade mediums. One by one, remove the