mirror of
https://github.com/ziglang/zig.git
synced 2025-12-23 22:53:06 +00:00
add missing ECONNRESET from getsockoptError
This commit is contained in:
parent
70c608add8
commit
2c79d669a7
@ -3146,6 +3146,9 @@ pub const ConnectError = error{
|
||||
|
||||
/// The given path for the unix socket does not exist.
|
||||
FileNotFound,
|
||||
|
||||
/// Connection was reset by peer before connect could complete.
|
||||
ConnectionResetByPeer,
|
||||
} || UnexpectedError;
|
||||
|
||||
/// Initiate a connection on a socket.
|
||||
@ -3223,6 +3226,7 @@ pub fn getsockoptError(sockfd: fd_t) ConnectError!void {
|
||||
ENOTSOCK => unreachable, // The file descriptor sockfd does not refer to a socket.
|
||||
EPROTOTYPE => unreachable, // The socket type does not support the requested communications protocol.
|
||||
ETIMEDOUT => return error.ConnectionTimedOut,
|
||||
ECONNRESET => return error.ConnectionResetByPeer,
|
||||
else => |err| return unexpectedErrno(err),
|
||||
},
|
||||
EBADF => unreachable, // The argument sockfd is not a valid file descriptor.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user