From 44739457ca5edf8dcfa23a97748485299d6ab8d5 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 18 May 2022 08:40:29 -0400 Subject: [PATCH] Fix DiscoveryImplPlatform::Shutdown so restart works correctly. (#18542) Until the changes in #18442 DiscoveryImplPlatform::Shutdown was a no-op on most platforms, so the fact that you could not re-init after that call did not matter, because nothing had actually been shut down. Now that we are actually shutting down mResolverProxy, we need to make sure a future call to Init() will correctly re-initialize things instead of just bailing out. --- src/lib/dnssd/Discovery_ImplPlatform.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/dnssd/Discovery_ImplPlatform.cpp b/src/lib/dnssd/Discovery_ImplPlatform.cpp index 42c5d8c04b4701..78e003f4f05a69 100644 --- a/src/lib/dnssd/Discovery_ImplPlatform.cpp +++ b/src/lib/dnssd/Discovery_ImplPlatform.cpp @@ -351,6 +351,7 @@ void DiscoveryImplPlatform::Shutdown() VerifyOrReturn(mDnssdInitialized); mResolverProxy.Shutdown(); ChipDnssdShutdown(); + mDnssdInitialized = false; } void DiscoveryImplPlatform::HandleDnssdInit(void * context, CHIP_ERROR initError)