Skip to content

Commit 64d4ec9

Browse files
committed
std.posix.read: should expect ConnectionRefused
Closes: #20219
1 parent fc2c188 commit 64d4ec9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/std/posix.zig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6088,6 +6088,9 @@ pub const SendError = error{
60886088

60896089
/// The local network interface used to reach the destination is down.
60906090
NetworkSubsystemFailed,
6091+
6092+
/// The destination address is not listening.
6093+
ConnectionRefused,
60916094
} || UnexpectedError;
60926095

60936096
pub const SendMsgError = SendError || error{
@@ -6319,7 +6322,6 @@ pub fn send(
63196322
error.AddressNotAvailable => unreachable,
63206323
error.SocketNotConnected => unreachable,
63216324
error.UnreachableAddress => unreachable,
6322-
error.ConnectionRefused => unreachable,
63236325
else => |e| return e,
63246326
};
63256327
}

0 commit comments

Comments
 (0)