You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Motivation:
The AsyncDNSResolver currently throws an error when there are no records
associated with a name. However, most query responses are arrays or
contain arrays. As such it's unclear to callers whether they should be
catching an error of a particular type or checking for the presence of
values some combination of the two.
Modifications:
- Modify the `DNSResolver` API to return `nil` where only a single value
is expected (e.g. CNAME).
- Update documentation on `DNSResolver` to clarify the expected return
values when no values are resolved.
- Update the c-ares backend to check for no data when parsing and return
empty responses
- Update the DNSSD backend to pass in `nil` data to the parser when the
status is timeout
- Remove the `noData` error code as it shouldn't be reachable anymore
Result:
Queries with no response either return empty or nil
0 commit comments