From c1c8710fa199f9be6c108eeea797493bf247a42d Mon Sep 17 00:00:00 2001 From: Sharad Binjola Date: Tue, 21 May 2024 14:17:45 -0700 Subject: [PATCH] Fix to cleanup SessionResumptionStorage onFabricRemoved --- .../tv-casting-common/src/PersistenceManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/tv-casting-app/tv-casting-common/src/PersistenceManager.cpp b/examples/tv-casting-app/tv-casting-common/src/PersistenceManager.cpp index 9feacd503f6a9a..03aacdfbca39fd 100644 --- a/examples/tv-casting-app/tv-casting-common/src/PersistenceManager.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/PersistenceManager.cpp @@ -536,6 +536,11 @@ void PersistenceManager::OnFabricRemoved(const FabricTable & fabricTable, Fabric } WriteAllVideoPlayers(cachedVideoPlayers); + + err = chip::Server::GetInstance().GetSessionResumptionStorage()->DeleteAll(fabricIndex); + ChipLogProgress(AppServer, + "PersistenceManager::OnFabricRemoved SessionResumptionStorage.DeleteAll(%d) status %" CHIP_ERROR_FORMAT, + fabricIndex, err.Format()); } CHIP_ERROR PersistenceManager::PurgeVideoPlayerCache()