commit e204b2ca92d095cef03cee123881fd1d9f1004d0 (tree)
parent 6de8748b057d99d6003e1d4a5f7fb027776522ad
Author: Andrew Kelley <andrew@ziglang.org>
Date: Sat, 17 Feb 2024 11:48:42 -0700
std.http.Client.connectUnix: handle unsupported OS at compile time
Diffstat:
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lib/std/http/Client.zig b/lib/std/http/Client.zig
@@ -1282,14 +1282,12 @@ pub fn connectTcp(client: *Client, host: []const u8, port: u16, protocol: Connec
return &conn.data;
}
-pub const ConnectUnixError = Allocator.Error || std.os.SocketError || error{ NameTooLong, Unsupported } || std.os.ConnectError;
+pub const ConnectUnixError = Allocator.Error || std.os.SocketError || error{NameTooLong} || std.os.ConnectError;
/// Connect to `path` as a unix domain socket. This will reuse a connection if one is already open.
///
/// This function is threadsafe.
pub fn connectUnix(client: *Client, path: []const u8) ConnectUnixError!*Connection {
- if (!net.has_unix_sockets) return error.Unsupported;
-
if (client.connection_pool.findConnection(.{
.host = path,
.port = 0,