From 8526b481f32c8372d3c19b1dd5197d435cbc254d Mon Sep 17 00:00:00 2001 From: "Irene Siu (Apple)" Date: Thu, 19 May 2022 18:15:40 -0700 Subject: [PATCH] Add OperationalDeviceProxy::Disconnect() call in DefaultOTARequestor::DisconnectFromProvider() to evict the session that we have conclusive evidence for indicating a lack of response from the peer. (#18642) --- src/app/clusters/ota-requestor/DefaultOTARequestor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp b/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp index 91d31823c62fa8..e7647d768b1bd5 100644 --- a/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp +++ b/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp @@ -400,7 +400,9 @@ void DefaultOTARequestor::DisconnectFromProvider() return; } - mCASESessionManager->ReleaseSession(fabricInfo->GetPeerIdForNode(mProviderLocation.Value().providerNodeID)); + PeerId peerID = fabricInfo->GetPeerIdForNode(mProviderLocation.Value().providerNodeID); + mCASESessionManager->FindExistingSession(peerID)->Disconnect(); + mCASESessionManager->ReleaseSession(peerID); } // Requestor is directed to cancel image update in progress. All the Requestor state is