aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorEvin Yulo <yujiri@disroot.org>2023-05-26 05:21:29 -0400
committerAndrew Kelley <andrew@ziglang.org>2023-06-13 11:16:09 -0700
commit137b115681c1ca205df27c70422c42460b5aa6ec (patch)
treed7cf69c5b5da2157dd1a33d4012545553c2e8f91 /lib/std
parentd7b73af8f65bb891c8700ed47777144bb6f35fe1 (diff)
downloadzig-137b115681c1ca205df27c70422c42460b5aa6ec.tar.gz
zig-137b115681c1ca205df27c70422c42460b5aa6ec.zip
os.connect: mark ECONNABORTED as unreachable
closes #13677
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/os.zig1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/std/os.zig b/lib/std/os.zig
index 1fe155c8ff..2987041c07 100644
--- a/lib/std/os.zig
+++ b/lib/std/os.zig
@@ -3999,6 +3999,7 @@ pub fn connect(sock: socket_t, sock_addr: *const sockaddr, len: socklen_t) Conne
.PROTOTYPE => unreachable, // The socket type does not support the requested communications protocol.
.TIMEDOUT => return error.ConnectionTimedOut,
.NOENT => return error.FileNotFound, // Returned when socket is AF.UNIX and the given path does not exist.
+ .CONNABORTED => unreachable, // Tried to reuse socket that previously received error.ConnectionRefused.
else => |err| return unexpectedErrno(err),
}
}