From 461036069934c9cbafbc24c5c3acc68e55bde912 Mon Sep 17 00:00:00 2001 From: Daniel Guzman Date: Thu, 24 Aug 2023 01:49:38 +0200 Subject: [PATCH] Return error.WouldBlock when connect returns .WSAEWOULDBLOCK --- lib/std/os.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/os.zig b/lib/std/os.zig index a58ca5333b..5af3f444a9 100644 --- a/lib/std/os.zig +++ b/lib/std/os.zig @@ -3982,7 +3982,7 @@ pub fn connect(sock: socket_t, sock_addr: *const sockaddr, len: socklen_t) Conne .WSAEINVAL => unreachable, .WSAEISCONN => unreachable, .WSAENOTSOCK => unreachable, - .WSAEWOULDBLOCK => unreachable, + .WSAEWOULDBLOCK => return error.WouldBlock, .WSAEACCES => unreachable, .WSAENOBUFS => return error.SystemResources, .WSAEAFNOSUPPORT => return error.AddressFamilyNotSupported,