diff --git a/src/controller/CHIPDevice.cpp b/src/controller/CHIPDevice.cpp index e39c17366ade35..5b8b05caf647bb 100644 --- a/src/controller/CHIPDevice.cpp +++ b/src/controller/CHIPDevice.cpp @@ -411,6 +411,8 @@ void Device::Reset() } SetActive(false); + mCASESession.Clear(); + mState = ConnectionState::NotConnected; mSessionManager = nullptr; mStatusDelegate = nullptr; diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index bc46075bb24302..80d8a0a9b19f21 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -316,6 +316,11 @@ CHIP_ERROR DeviceController::Shutdown() ChipLogDetail(Controller, "Shutting down the controller"); + for (uint32_t i = 0; i < kNumMaxActiveDevices; i++) + { + mActiveDevices[i].Reset(); + } + #if CONFIG_DEVICE_LAYER // // We can safely call PlatformMgr().Shutdown(), which like DeviceController::Shutdown(),