| ... | ... | @@ -675,6 +675,9 @@ pub const WriteError = error{ |
| 675 | 675 | /// This error occurs when no global event loop is configured, |
| 676 | 676 | /// and reading from the file descriptor would block. |
| 677 | 677 | WouldBlock, |
| 678 | |
| 679 | /// Connection reset by peer. |
| 680 | ConnectionResetByPeer, |
| 678 | 681 | } || UnexpectedError; |
| 679 | 682 | |
| 680 | 683 | /// Write to a file descriptor. |
| ... | ... | @@ -752,6 +755,7 @@ pub fn write(fd: fd_t, bytes: []const u8) WriteError!usize { |
| 752 | 755 | ENOSPC => return error.NoSpaceLeft, |
| 753 | 756 | EPERM => return error.AccessDenied, |
| 754 | 757 | EPIPE => return error.BrokenPipe, |
| 758 | ECONNRESET => return error.ConnectionResetByPeer, |
| 755 | 759 | else => |err| return unexpectedErrno(err), |
| 756 | 760 | } |
| 757 | 761 | } |
| ... | ... | @@ -820,6 +824,7 @@ pub fn writev(fd: fd_t, iov: []const iovec_const) WriteError!usize { |
| 820 | 824 | ENOSPC => return error.NoSpaceLeft, |
| 821 | 825 | EPERM => return error.AccessDenied, |
| 822 | 826 | EPIPE => return error.BrokenPipe, |
| 827 | ECONNRESET => return error.ConnectionResetByPeer, |
| 823 | 828 | else => |err| return unexpectedErrno(err), |
| 824 | 829 | } |
| 825 | 830 | } |