authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-11-04 14:39:59-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-11-04 14:40:30-05:00
log6c1728206288264c4d2508a190d392ade68d115c
tree72b8bd3ffa415b0f6a98c41460e6a899dedf4568
parentaaf50970a88141e742832b30dbd290eeaa812704
signaturelock-open Commit is signed but in an unrecognized format.

std.os.read can fail with ConnectionResetByPeer


1 files changed, 2 insertions(+), 0 deletions(-)

lib/std/os.zig+2
......@@ -274,6 +274,7 @@ pub const ReadError = error{
274274 IsDir,
275275 OperationAborted,
276276 BrokenPipe,
277 ConnectionResetByPeer,
277278
278279 /// This error occurs when no global event loop is configured,
279280 /// and reading from the file descriptor would block.
......@@ -320,6 +321,7 @@ pub fn read(fd: fd_t, buf: []u8) ReadError!usize {
320321 EISDIR => return error.IsDir,
321322 ENOBUFS => return error.SystemResources,
322323 ENOMEM => return error.SystemResources,
324 ECONNRESET => return error.ConnectionResetByPeer,
323325 else => |err| return unexpectedErrno(err),
324326 }
325327 }