Skip to content

Commit

Permalink
Shut down InteractionModelEngine during DeviceController shutdown. (#…
Browse files Browse the repository at this point in the history
…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 Jun 15, 2021
1 parent 8ef99f6 commit 9f9907b
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 9f9907b

Please sign in to comment.