diff --git a/lib/std/posix.zig b/lib/std/posix.zig index 1a969210aa78..e4f40faeca2e 100644 --- a/lib/std/posix.zig +++ b/lib/std/posix.zig @@ -5436,6 +5436,9 @@ pub const SendError = error{ /// The destination address is not listening. ConnectionRefused, + + /// The connection timed out. + ConnectionTimedOut, } || UnexpectedError; pub const SendMsgError = SendError || error{ @@ -5522,6 +5525,7 @@ pub fn sendmsg( .NETUNREACH => return error.NetworkUnreachable, .NOTCONN => return error.SocketUnconnected, .NETDOWN => return error.NetworkDown, + .TIMEDOUT => return error.ConnectionTimedOut, else => |err| return unexpectedErrno(err), } } @@ -5627,6 +5631,7 @@ pub fn sendto( .NETUNREACH => return error.NetworkUnreachable, .NOTCONN => return error.SocketUnconnected, .NETDOWN => return error.NetworkDown, + .TIMEDOUT => return error.ConnectionTimedOut, else => |err| return unexpectedErrno(err), } }