From e6f1da65c9ffb845c9b7d17cca9e61205077ed03 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 11 Apr 2023 11:39:56 -0400 Subject: [PATCH] Fix shutdown ordering in TestDnssd. (#26024) For init it does, in order: PlatformMgr().InitChipStack(), ChipDnssdInit, RunEventLoop. For shutdown it should do them in exactly the opposite order. Fixes https://github.com/project-chip/connectedhomeip/issues/26023 --- src/platform/tests/TestDnssd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/tests/TestDnssd.cpp b/src/platform/tests/TestDnssd.cpp index fe7312fff8d7c9..4a0437ce35bfb6 100644 --- a/src/platform/tests/TestDnssd.cpp +++ b/src/platform/tests/TestDnssd.cpp @@ -164,8 +164,8 @@ int TestDnssd() // This will stop the event loop above, and wait till it has actually stopped // (i.e exited RunEventLoop()). // - chip::Dnssd::ChipDnssdShutdown(); chip::DeviceLayer::PlatformMgr().StopEventLoopTask(); + chip::Dnssd::ChipDnssdShutdown(); chip::DeviceLayer::PlatformMgr().Shutdown(); shutdown = true; @@ -181,8 +181,8 @@ int TestDnssd() if (!shutdown) { - chip::Dnssd::ChipDnssdShutdown(); chip::DeviceLayer::PlatformMgr().StopEventLoopTask(); + chip::Dnssd::ChipDnssdShutdown(); chip::DeviceLayer::PlatformMgr().Shutdown(); } chip::Platform::MemoryShutdown();