From 7d04b16a1153aca7722ad1c6798e41f9359d87f4 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()