Skip to content

DNSSD based queries are incomplete #38

@gmilos

Description

@gmilos

On macOS (where DNSSD is being used by default), queries for domains with multiple records, such as:

AsyncDNSResolver().queryAAAA(name: "iadsdk.apple.com.akadns.net")

normally return the two AAAA records associated with the domain. However, occasionally, only one is returned. It happens at roughly 1% of the time in my tests, but since this is a race, that number will fluctuate with the different timing conditions.

The core reason for this is that the library calls DNSServiceProcessResult precisely once. The callbacks are delivered as a result of this call, but DNSSD offers no guarantees about how many records will get provided per DNSServiceProcessResult invocation.

Additionally, while DNSSD provides kDNSServiceFlagsMoreComing, the flag is designed to reduce unnecessary UI updates only. It'd be fragile to use attach additional semantics to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions