From 8b74176032aa18080b45484ac15bdd5b02a9fa09 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 13 Apr 2022 10:28:54 -1000 Subject: [PATCH] Revert "[Darwin] Keep resolving ips even when the first mdns result has been received (#17246)" (#17358) This reverts commit d125841a4400caf61225db3f09582798fe8eda0b. --- src/platform/Darwin/DnssdImpl.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/platform/Darwin/DnssdImpl.cpp b/src/platform/Darwin/DnssdImpl.cpp index a520c4baf0e6d5..2669fbe2693162 100644 --- a/src/platform/Darwin/DnssdImpl.cpp +++ b/src/platform/Darwin/DnssdImpl.cpp @@ -531,10 +531,9 @@ static void OnResolve(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t inter GetAddrInfo(sdCtx->context, sdCtx->callback, interfaceId, sdCtx->addressType, sdCtx->name, hostname, ntohs(port), txtLen, txtRecord); - if (!(flags & kDNSServiceFlagsMoreComing)) - { - MdnsContexts::GetInstance().Remove(sdCtx); - } + // TODO: If flags & kDNSServiceFlagsMoreComing should we keep waiting to see + // what else we resolve instead of calling Remove() here? + MdnsContexts::GetInstance().Remove(sdCtx); } static CHIP_ERROR Resolve(void * context, DnssdResolveCallback callback, uint32_t interfaceId,