Skip to content

Commit

Permalink
Fix shutdown ordering in TestDnssd. (#26024)
Browse files Browse the repository at this point in the history
For init it does, in order: PlatformMgr().InitChipStack(), ChipDnssdInit,
RunEventLoop.

For shutdown it should do them in exactly the opposite order.

Fixes #26023
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Apr 29, 2024
1 parent b85ad02 commit 1040216
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/platform/tests/TestDnssd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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();
Expand Down

0 comments on commit 1040216

Please sign in to comment.