From b7b429e2ff44be3963120c5b8b398fe5a29a78eb Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Mon, 30 Sep 2024 18:50:46 +0200 Subject: [PATCH] [TV Apps] Change the shutdown ordering to prevent some crashes when both commissioner and server are enabled (#35843) --- examples/platform/linux/AppMain.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/platform/linux/AppMain.cpp b/examples/platform/linux/AppMain.cpp index 074f078af003b4..a2e341efbe7a0f 100644 --- a/examples/platform/linux/AppMain.cpp +++ b/examples/platform/linux/AppMain.cpp @@ -679,16 +679,16 @@ void ChipLinuxAppMainLoop(AppMainLoopImplementation * impl) ApplicationShutdown(); -#if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE - ShutdownCommissioner(); -#endif // CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE - #if defined(ENABLE_CHIP_SHELL) shellThread.join(); #endif Server::GetInstance().Shutdown(); +#if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE + ShutdownCommissioner(); +#endif // CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE + #if ENABLE_TRACING tracing_setup.StopTracing(); #endif