Skip to content

Commit

Permalink
Properly shut down the exchange manager when shutting down system sta…
Browse files Browse the repository at this point in the history
…te. (#10359)

The leak that caused us to not do this before seems to be fixed with
the exchange lifetime work that has happened since.

Fixes #6668
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Nov 15, 2021
1 parent 366dc1e commit 2034657
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/controller/CHIPDeviceControllerFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,10 @@ CHIP_ERROR DeviceControllerSystemState::Shutdown()
ReturnErrorOnFailure(DeviceLayer::PlatformMgr().Shutdown());
#endif

// TODO(#6668): Some exchange has leak, shutting down ExchangeManager will cause a assert fail.
// if (mExchangeMgr != nullptr)
// {
// mExchangeMgr->Shutdown();
// }
if (mExchangeMgr != nullptr)
{
mExchangeMgr->Shutdown();
}
if (mSessionMgr != nullptr)
{
mSessionMgr->Shutdown();
Expand Down

0 comments on commit 2034657

Please sign in to comment.