diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 75a4262716f5a8..0793832d17271c 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -247,6 +247,10 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) } #endif // CHIP_CONFIG_ENABLE_SERVER_IM_EVENT +#ifdef CHIP_CONFIG_ENABLE_ICD_SERVER + mICDEventManager.Init(&mICDManager); +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER + // This initializes clusters, so should come after lower level initialization. InitDataModelHandler(); @@ -484,6 +488,9 @@ void Server::Shutdown() mAccessControl.Finish(); Access::ResetAccessControlToDefault(); Credentials::SetGroupDataProvider(nullptr); +#ifdef CHIP_CONFIG_ENABLE_ICD_SERVER + mICDEventManager.Shutdown(); +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER mAttributePersister.Shutdown(); // TODO(16969): Remove chip::Platform::MemoryInit() call from Server class, it belongs to outer code chip::Platform::MemoryShutdown();