Skip to content

Commit

Permalink
Fix CI failure by adjusting the shutdown order
Browse files Browse the repository at this point in the history
  • Loading branch information
yufengwangca committed Feb 18, 2022
1 parent e91a8c4 commit 0fc8b12
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/platform/Linux/PlatformManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack()

CHIP_ERROR PlatformManagerImpl::_Shutdown()
{
CHIP_ERROR err;
uint64_t upTime = 0;

if (GetDiagnosticDataProvider().GetUpTime(upTime) == CHIP_NO_ERROR)
Expand All @@ -237,6 +238,8 @@ CHIP_ERROR PlatformManagerImpl::_Shutdown()
ChipLogError(DeviceLayer, "Failed to get current uptime since the Node’s last reboot");
}

err = Internal::GenericPlatformManagerImpl_POSIX<PlatformManagerImpl>::_Shutdown();

#if CHIP_WITH_GIO
if (pthread_cancel(mGdbusThreadHandle) != 0)
{
Expand All @@ -251,7 +254,7 @@ CHIP_ERROR PlatformManagerImpl::_Shutdown()
}
#endif

return Internal::GenericPlatformManagerImpl_POSIX<PlatformManagerImpl>::_Shutdown();
return err;
}

CHIP_ERROR PlatformManagerImpl::_GetFixedLabelList(
Expand Down

0 comments on commit 0fc8b12

Please sign in to comment.