mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 14:55:25 +00:00
std.http: connectUnix return Unsupported on targets without unix sockets
This commit is contained in:
parent
aa090a49d9
commit
3817c7382b
@ -958,9 +958,11 @@ pub fn connectUnproxied(client: *Client, host: []const u8, port: u16, protocol:
|
||||
return conn;
|
||||
}
|
||||
|
||||
pub const ConnectUnixError = Allocator.Error || std.os.SocketError || error{NameTooLong} || std.os.ConnectError;
|
||||
pub const ConnectUnixError = Allocator.Error || std.os.SocketError || error{ NameTooLong, Unsupported } || std.os.ConnectError;
|
||||
|
||||
pub fn connectUnix(client: *Client, path: []const u8) ConnectUnixError!*ConnectionPool.Node {
|
||||
if (!net.has_unix_sockets) return error.Unsupported;
|
||||
|
||||
if (client.connection_pool.findConnection(.{
|
||||
.host = path,
|
||||
.port = 0,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user