| ... | @@ -274,6 +274,7 @@ pub const ReadError = error{ | ... | @@ -274,6 +274,7 @@ pub const ReadError = error{ |
| 274 | IsDir, | 274 | IsDir, |
| 275 | OperationAborted, | 275 | OperationAborted, |
| 276 | BrokenPipe, | 276 | BrokenPipe, |
| | 277 | ConnectionResetByPeer, |
| 277 | | 278 | |
| 278 | /// This error occurs when no global event loop is configured, | 279 | /// This error occurs when no global event loop is configured, |
| 279 | /// and reading from the file descriptor would block. | 280 | /// and reading from the file descriptor would block. |
| ... | @@ -320,6 +321,7 @@ pub fn read(fd: fd_t, buf: []u8) ReadError!usize { | ... | @@ -320,6 +321,7 @@ pub fn read(fd: fd_t, buf: []u8) ReadError!usize { |
| 320 | EISDIR => return error.IsDir, | 321 | EISDIR => return error.IsDir, |
| 321 | ENOBUFS => return error.SystemResources, | 322 | ENOBUFS => return error.SystemResources, |
| 322 | ENOMEM => return error.SystemResources, | 323 | ENOMEM => return error.SystemResources, |
| | 324 | ECONNRESET => return error.ConnectionResetByPeer, |
| 323 | else => |err| return unexpectedErrno(err), | 325 | else => |err| return unexpectedErrno(err), |
| 324 | } | 326 | } |
| 325 | } | 327 | } |