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 (#7605)
  • Loading branch information
vivien-apple authored and pull[bot] committed Aug 25, 2021
1 parent 699382d commit 1354008
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 1354008

Please sign in to comment.