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.
diff --git a/src/app/CASESessionManager.cpp b/src/app/CASESessionManager.cpp
index 162ae70..dc26563 100644
--- a/src/app/CASESessionManager.cpp
+++ b/src/app/CASESessionManager.cpp
@@ -29,6 +29,11 @@
return AddressResolve::Resolver::Instance().Init(systemLayer);
}
+void CASESessionManager::Shutdown()
+{
+ AddressResolve::Resolver::Instance().Shutdown();
+}
+
void CASESessionManager::FindOrEstablishSession(const ScopedNodeId & peerId, Callback::Callback<OnDeviceConnected> * onConnection,
Callback::Callback<OnDeviceConnectionFailure> * onFailure,
#if CHIP_DEVICE_CONFIG_ENABLE_AUTOMATIC_CASE_RETRIES
diff --git a/src/app/CASESessionManager.h b/src/app/CASESessionManager.h
index 38b3910..e536a62 100644
--- a/src/app/CASESessionManager.h
+++ b/src/app/CASESessionManager.h
@@ -59,7 +59,7 @@
}
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