| ... | ... | @@ -2906,21 +2906,21 @@ pub fn accept( |
| 2906 | 2906 | loop.waitUntilFdReadable(sock); |
| 2907 | 2907 | continue; |
| 2908 | 2908 | } else { |
| 2909 | | return error.WouldBlock; |
| 2910 | | }, |
| 2911 | | EBADF => unreachable, // always a race condition |
| 2912 | | ECONNABORTED => return error.ConnectionAborted, |
| 2913 | | EFAULT => unreachable, |
| 2914 | | EINVAL => return error.SocketNotListening, |
| 2915 | | ENOTSOCK => unreachable, |
| 2916 | | EMFILE => return error.ProcessFdQuotaExceeded, |
| 2917 | | ENFILE => return error.SystemFdQuotaExceeded, |
| 2918 | | ENOBUFS => return error.SystemResources, |
| 2919 | | ENOMEM => return error.SystemResources, |
| 2920 | | EOPNOTSUPP => unreachable, |
| 2921 | | EPROTO => return error.ProtocolFailure, |
| 2922 | | EPERM => return error.BlockedByFirewall, |
| 2923 | | else => |err| return unexpectedErrno(err), |
| 2909 | return error.WouldBlock; |
| 2910 | }, |
| 2911 | EBADF => unreachable, // always a race condition |
| 2912 | ECONNABORTED => return error.ConnectionAborted, |
| 2913 | EFAULT => unreachable, |
| 2914 | EINVAL => return error.SocketNotListening, |
| 2915 | ENOTSOCK => unreachable, |
| 2916 | EMFILE => return error.ProcessFdQuotaExceeded, |
| 2917 | ENFILE => return error.SystemFdQuotaExceeded, |
| 2918 | ENOBUFS => return error.SystemResources, |
| 2919 | ENOMEM => return error.SystemResources, |
| 2920 | EOPNOTSUPP => unreachable, |
| 2921 | EPROTO => return error.ProtocolFailure, |
| 2922 | EPERM => return error.BlockedByFirewall, |
| 2923 | else => |err| return unexpectedErrno(err), |
| 2924 | 2924 | } |
| 2925 | 2925 | } |
| 2926 | 2926 | } else unreachable; |
| ... | ... | @@ -3120,7 +3120,7 @@ pub fn connect(sock: socket_t, sock_addr: *const sockaddr, len: socklen_t) Conne |
| 3120 | 3120 | .WSAECONNREFUSED => return error.ConnectionRefused, |
| 3121 | 3121 | .WSAETIMEDOUT => return error.ConnectionTimedOut, |
| 3122 | 3122 | .WSAEHOSTUNREACH // TODO: should we return NetworkUnreachable in this case as well? |
| 3123 | | , .WSAENETUNREACH => return error.NetworkUnreachable, |
| 3123 | , .WSAENETUNREACH => return error.NetworkUnreachable, |
| 3124 | 3124 | .WSAEFAULT => unreachable, |
| 3125 | 3125 | .WSAEINVAL => unreachable, |
| 3126 | 3126 | .WSAEISCONN => unreachable, |