Skip to content

Commit

Permalink
Shut down InteractionModelEngine during DeviceController shutdown. (p…
Browse files Browse the repository at this point in the history
…roject-chip#7629)

Otherwise if we have an IM action in flight at shutdown time we will
effectively leak the object managing it, and after a few
shutdown/restart cycles for the stack not be able to send any more IM
actions.
  • Loading branch information
bzbarsky-apple authored and Nikita committed Sep 23, 2021
1 parent 0f4fd8f commit e58e1d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/controller/CHIPDeviceController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ CHIP_ERROR DeviceController::Shutdown()

mState = State::NotInitialized;

// Shut down the interaction model before we try shuttting down the exchange
// manager.
app::InteractionModelEngine::GetInstance()->Shutdown();

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

0 comments on commit e58e1d7

Please sign in to comment.