authorgravatar for bill@axzez.comBill Nagel <bill@axzez.com> 2021-01-12 14:53:58-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-01-12 18:11:58-08:00
log2c79d669a7ad802c795583cf66bca1fffc8ce23e
treef5b4e91ab74263b71c6c15148d75542364eb27c4
parent70c608add8b6112a38144b8aa40b351632220fa3

add missing ECONNRESET from getsockoptError


1 files changed, 4 insertions(+), 0 deletions(-)

lib/std/os.zig+4
......@@ -3146,6 +3146,9 @@ pub const ConnectError = error{
31463146
31473147 /// The given path for the unix socket does not exist.
31483148 FileNotFound,
3149
3150 /// Connection was reset by peer before connect could complete.
3151 ConnectionResetByPeer,
31493152} || UnexpectedError;
31503153
31513154/// Initiate a connection on a socket.
......@@ -3223,6 +3226,7 @@ pub fn getsockoptError(sockfd: fd_t) ConnectError!void {
32233226 ENOTSOCK => unreachable, // The file descriptor sockfd does not refer to a socket.
32243227 EPROTOTYPE => unreachable, // The socket type does not support the requested communications protocol.
32253228 ETIMEDOUT => return error.ConnectionTimedOut,
3229 ECONNRESET => return error.ConnectionResetByPeer,
32263230 else => |err| return unexpectedErrno(err),
32273231 },
32283232 EBADF => unreachable, // The argument sockfd is not a valid file descriptor.