mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
Merge 59c26f75d9 into d0ba6642b5
This commit is contained in:
commit
31ca6ffa22
2 changed files with 3 additions and 2 deletions
|
|
@ -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(
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue