Skip to content

Commit

Permalink
[Controller] Return an error during shutdown if no device layer is us…
Browse files Browse the repository at this point in the history
…ed and something unexpected happens during inet/system shutdown (project-chip#7605)
  • Loading branch information
vivien-apple authored and Nikita committed Sep 23, 2021
1 parent 227b6b6 commit 1effeb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controller/CHIPDeviceController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ CHIP_ERROR DeviceController::Shutdown()
//
ReturnErrorOnFailure(DeviceLayer::PlatformMgr().Shutdown());
#else
mInetLayer->Shutdown();
mSystemLayer->Shutdown();
VerifyOrReturnError(mInetLayer->Shutdown() == INET_NO_ERROR, CHIP_ERROR_INTERNAL);
VerifyOrReturnError(mSystemLayer->Shutdown() == CHIP_SYSTEM_NO_ERROR, CHIP_ERROR_INTERNAL);
chip::Platform::Delete(mInetLayer);
chip::Platform::Delete(mSystemLayer);
#endif // CONFIG_DEVICE_LAYER
Expand Down

0 comments on commit 1effeb0

Please sign in to comment.