From adff7d9619c303cbefd26cbf6ef094bc3bbe1c86 Mon Sep 17 00:00:00 2001 From: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> Date: Wed, 29 May 2024 12:03:45 +1200 Subject: [PATCH] CASESessionManager should shut down AddressResolve::Resolver (#33607) CASESessionManager initializes the address resolver in its Init method, so it should also shut it down in Shutdown. --- src/app/CASESessionManager.cpp | 5 +++++ src/app/CASESessionManager.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/CASESessionManager.cpp b/src/app/CASESessionManager.cpp index 162ae7021a9f9f..dc2656338d791a 100644 --- a/src/app/CASESessionManager.cpp +++ b/src/app/CASESessionManager.cpp @@ -29,6 +29,11 @@ CHIP_ERROR CASESessionManager::Init(chip::System::Layer * systemLayer, const CAS return AddressResolve::Resolver::Instance().Init(systemLayer); } +void CASESessionManager::Shutdown() +{ + AddressResolve::Resolver::Instance().Shutdown(); +} + void CASESessionManager::FindOrEstablishSession(const ScopedNodeId & peerId, Callback::Callback * onConnection, Callback::Callback * onFailure, #if CHIP_DEVICE_CONFIG_ENABLE_AUTOMATIC_CASE_RETRIES diff --git a/src/app/CASESessionManager.h b/src/app/CASESessionManager.h index 38b39108b43b7e..e536a62cf80908 100644 --- a/src/app/CASESessionManager.h +++ b/src/app/CASESessionManager.h @@ -59,7 +59,7 @@ class CASESessionManager : public OperationalSessionReleaseDelegate, public Sess } CHIP_ERROR Init(chip::System::Layer * systemLayer, const CASESessionManagerConfig & params); - void Shutdown() {} + void Shutdown(); /** * Find an existing session for the given node ID, or trigger a new session