Skip to content

Commit

Permalink
[Darwin] Keep resolving ips even when the first mdns result has been …
Browse files Browse the repository at this point in the history
…received (#17246)
  • Loading branch information
vivien-apple authored and pull[bot] committed Nov 6, 2023
1 parent 67b70d4 commit 93cc959
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/platform/Darwin/DnssdImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,10 @@ 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);

// TODO: If flags & kDNSServiceFlagsMoreComing should we keep waiting to see
// what else we resolve instead of calling Remove() here?
MdnsContexts::GetInstance().Remove(sdCtx);
if (!(flags & kDNSServiceFlagsMoreComing))
{
MdnsContexts::GetInstance().Remove(sdCtx);
}
}

static CHIP_ERROR Resolve(void * context, DnssdResolveCallback callback, uint32_t interfaceId,
Expand Down

0 comments on commit 93cc959

Please sign in to comment.