aboutsummaryrefslogtreecommitdiff
path: root/src/link.zig
diff options
context:
space:
mode:
authorLauri Tirkkonen <lauri@hacktheplanet.fi>2023-07-27 22:31:51 +0900
committerAndrew Kelley <andrew@ziglang.org>2023-11-26 21:35:36 -0500
commit19af8aac82510d9adc35fa11db9c57676d4abd23 (patch)
tree9d14d2b31884f43fb714e951e03e26d76e3d1ca8 /src/link.zig
parent280140595fcfe9676ed32a7906eb7958a4c595b1 (diff)
downloadzig-19af8aac82510d9adc35fa11db9c57676d4abd23.tar.gz
zig-19af8aac82510d9adc35fa11db9c57676d4abd23.zip
os: expect ETIMEDOUT, ECONNRESET, ENOTCONN from recvfrom & read family
reads on eg. connected TCP sockets can fail with ETIMEDOUT, and ENOTCONN happens eg. if you try to read a TCP socket that has not been connected yet. interestingly read() was already handling CONNRESET & TIMEDOUT, but readv(), pread(), and preadv() were somewhat inconsistent.
Diffstat (limited to 'src/link.zig')
-rw-r--r--src/link.zig1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/link.zig b/src/link.zig
index 2c5b0f6656..45906109ef 100644
--- a/src/link.zig
+++ b/src/link.zig
@@ -531,6 +531,7 @@ pub const File = struct {
BrokenPipe,
ConnectionResetByPeer,
ConnectionTimedOut,
+ SocketNotConnected,
NotOpenForReading,
WouldBlock,
AccessDenied,