This commit is contained in:
Kevin Primm 2025-11-25 12:15:00 -05:00 committed by GitHub
commit 31ca6ffa22
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -5381,7 +5381,7 @@ fn lookupDnsSearch(
if (lookupDns(t, lookup_canon_name, &rc, resolved, options)) |result| { if (lookupDns(t, lookup_canon_name, &rc, resolved, options)) |result| {
return result; return result;
} else |err| switch (err) { } else |err| switch (err) {
error.UnknownHostName => continue, error.UnknownHostName, error.NoAddressReturned => continue,
else => |e| return e, else => |e| return e,
} }
} }
@ -5575,7 +5575,7 @@ fn lookupDns(
} }
try resolved.putOne(t_io, .{ .canonical_name = canonical_name orelse .{ .bytes = lookup_canon_name } }); try resolved.putOne(t_io, .{ .canonical_name = canonical_name orelse .{ .bytes = lookup_canon_name } });
if (addresses_len == 0) return error.NameServerFailure; if (addresses_len == 0) return error.NoAddressReturned;
} }
fn lookupHosts( fn lookupHosts(

View file

@ -75,6 +75,7 @@ pub const LookupError = error{
InvalidDnsAAAARecord, InvalidDnsAAAARecord,
InvalidDnsCnameRecord, InvalidDnsCnameRecord,
NameServerFailure, NameServerFailure,
NoAddressReturned,
/// Failed to open or read "/etc/hosts" or "/etc/resolv.conf". /// Failed to open or read "/etc/hosts" or "/etc/resolv.conf".
DetectingNetworkConfigurationFailed, DetectingNetworkConfigurationFailed,
} || Io.Clock.Error || IpAddress.BindError || Io.Cancelable; } || Io.Clock.Error || IpAddress.BindError || Io.Cancelable;