From 1f0b8c64747405812a731a2578889e7e35fb49cc Mon Sep 17 00:00:00 2001 From: "Irene Siu (Apple)" <98558756+isiu-apple@users.noreply.github.com> Date: Thu, 19 May 2022 14:42:06 -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. --- 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