diff --git a/src/protocols/secure_channel/MessageCounterManager.cpp b/src/protocols/secure_channel/MessageCounterManager.cpp index 62fbf8e2ae355a..3fa3d428dc18b4 100644 --- a/src/protocols/secure_channel/MessageCounterManager.cpp +++ b/src/protocols/secure_channel/MessageCounterManager.cpp @@ -53,6 +53,7 @@ void MessageCounterManager::Shutdown() if (mExchangeMgr != nullptr) { mExchangeMgr->UnregisterUnsolicitedMessageHandlerForType(Protocols::SecureChannel::MsgType::MsgCounterSyncReq); + mExchangeMgr->CloseAllContextsForDelegate(this); mExchangeMgr = nullptr; } }