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
  • Loading branch information
vivien-apple committed Jun 14, 2021
1 parent 7124079 commit 53b874a
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 @@ -299,8 +299,8 @@ CHIP_ERROR DeviceController::Shutdown()
// great at all.
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 53b874a

Please sign in to comment.