Return error.WouldBlock when connect returns .WSAEWOULDBLOCK

This commit is contained in:
Daniel Guzman 2023-08-24 01:49:38 +02:00 committed by Andrew Kelley
parent 9ea2076663
commit 4610360699

View File

@ -3982,7 +3982,7 @@ pub fn connect(sock: socket_t, sock_addr: *const sockaddr, len: socklen_t) Conne
.WSAEINVAL => unreachable, .WSAEINVAL => unreachable,
.WSAEISCONN => unreachable, .WSAEISCONN => unreachable,
.WSAENOTSOCK => unreachable, .WSAENOTSOCK => unreachable,
.WSAEWOULDBLOCK => unreachable, .WSAEWOULDBLOCK => return error.WouldBlock,
.WSAEACCES => unreachable, .WSAEACCES => unreachable,
.WSAENOBUFS => return error.SystemResources, .WSAENOBUFS => return error.SystemResources,
.WSAEAFNOSUPPORT => return error.AddressFamilyNotSupported, .WSAEAFNOSUPPORT => return error.AddressFamilyNotSupported,