Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/backend/io_uring.zig
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ pub const Completion = struct {
else switch (@as(posix.E, @enumFromInt(-res))) {
.CANCELED => error.Canceled,
.PIPE => error.BrokenPipe,
.CONNRESET => error.ConnectionReset,
.CONNRESET => error.ConnectionResetByPeer,
else => |errno| posix.unexpectedErrno(errno),
},
},
Expand All @@ -720,7 +720,7 @@ pub const Completion = struct {
else switch (@as(posix.E, @enumFromInt(-res))) {
.CANCELED => error.Canceled,
.PIPE => error.BrokenPipe,
.CONNRESET => error.ConnectionReset,
.CONNRESET => error.ConnectionResetByPeer,
else => |errno| posix.unexpectedErrno(errno),
},
},
Expand Down Expand Up @@ -819,7 +819,7 @@ pub const Completion = struct {

return switch (@as(posix.E, @enumFromInt(-res))) {
.CANCELED => error.Canceled,
.CONNRESET => error.ConnectionReset,
.CONNRESET => error.ConnectionResetByPeer,
else => |errno| posix.unexpectedErrno(errno),
};
}
Expand Down Expand Up @@ -1074,7 +1074,7 @@ pub const ReadError = error{
EOF,
Canceled,
Unexpected,
ConnectionReset,
ConnectionResetByPeer,
};

pub const ShutdownError = error{
Expand All @@ -1085,7 +1085,7 @@ pub const ShutdownError = error{
pub const WriteError = error{
Canceled,
BrokenPipe,
ConnectionReset,
ConnectionResetByPeer,
Unexpected,
};

Expand Down
20 changes: 10 additions & 10 deletions src/backend/iocp.zig
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ pub const Loop = struct {
break :action switch (err) {
windows.ws2_32.WinsockError.WSA_IO_PENDING => .{ .submitted = {} },
.WSA_OPERATION_ABORTED, .WSAECONNABORTED => .{ .result = .{ .send = error.Canceled } },
.WSAECONNRESET, .WSAENETRESET => .{ .result = .{ .send = error.ConnectionReset } },
.WSAECONNRESET, .WSAENETRESET => .{ .result = .{ .send = error.ConnectionResetByPeer } },
else => .{ .result = .{ .send = windows.unexpectedWSAError(err) } },
};
}
Expand Down Expand Up @@ -652,7 +652,7 @@ pub const Loop = struct {
break :action switch (err) {
windows.ws2_32.WinsockError.WSA_IO_PENDING => .{ .submitted = {} },
.WSA_OPERATION_ABORTED, .WSAECONNABORTED => .{ .result = .{ .recv = error.Canceled } },
.WSAECONNRESET, .WSAENETRESET => .{ .result = .{ .recv = error.ConnectionReset } },
.WSAECONNRESET, .WSAENETRESET => .{ .result = .{ .recv = error.ConnectionResetByPeer } },
else => .{ .result = .{ .recv = windows.unexpectedWSAError(err) } },
};
}
Expand All @@ -679,7 +679,7 @@ pub const Loop = struct {
break :action switch (err) {
windows.ws2_32.WinsockError.WSA_IO_PENDING => .{ .submitted = {} },
.WSA_OPERATION_ABORTED, .WSAECONNABORTED => .{ .result = .{ .sendto = error.Canceled } },
.WSAECONNRESET, .WSAENETRESET => .{ .result = .{ .sendto = error.ConnectionReset } },
.WSAECONNRESET, .WSAENETRESET => .{ .result = .{ .sendto = error.ConnectionResetByPeer } },
else => .{ .result = .{ .sendto = windows.unexpectedWSAError(err) } },
};
}
Expand Down Expand Up @@ -709,7 +709,7 @@ pub const Loop = struct {
break :action switch (err) {
windows.ws2_32.WinsockError.WSA_IO_PENDING => .{ .submitted = {} },
.WSA_OPERATION_ABORTED, .WSAECONNABORTED => .{ .result = .{ .recvfrom = error.Canceled } },
.WSAECONNRESET, .WSAENETRESET => .{ .result = .{ .recvfrom = error.ConnectionReset } },
.WSAECONNRESET, .WSAENETRESET => .{ .result = .{ .recvfrom = error.ConnectionResetByPeer } },
else => .{ .result = .{ .recvfrom = windows.unexpectedWSAError(err) } },
};
}
Expand Down Expand Up @@ -1049,7 +1049,7 @@ pub const Completion = struct {
break :r .{
.send = switch (err) {
.WSA_OPERATION_ABORTED, .WSAECONNABORTED => error.Canceled,
.WSAECONNRESET, .WSAENETRESET => error.ConnectionReset,
.WSAECONNRESET, .WSAENETRESET => error.ConnectionResetByPeer,
else => windows.unexpectedWSAError(err),
},
};
Expand All @@ -1068,7 +1068,7 @@ pub const Completion = struct {
break :r .{
.recv = switch (err) {
.WSA_OPERATION_ABORTED, .WSAECONNABORTED => error.Canceled,
.WSAECONNRESET, .WSAENETRESET => error.ConnectionReset,
.WSAECONNRESET, .WSAENETRESET => error.ConnectionResetByPeer,
else => windows.unexpectedWSAError(err),
},
};
Expand Down Expand Up @@ -1103,7 +1103,7 @@ pub const Completion = struct {
break :r .{
.sendto = switch (err) {
.WSA_OPERATION_ABORTED, .WSAECONNABORTED => error.Canceled,
.WSAECONNRESET, .WSAENETRESET => error.ConnectionReset,
.WSAECONNRESET, .WSAENETRESET => error.ConnectionResetByPeer,
else => windows.unexpectedWSAError(err),
},
};
Expand All @@ -1122,7 +1122,7 @@ pub const Completion = struct {
break :r .{
.recvfrom = switch (err) {
.WSA_OPERATION_ABORTED, .WSAECONNABORTED => error.Canceled,
.WSAECONNRESET, .WSAENETRESET => error.ConnectionReset,
.WSAECONNRESET, .WSAENETRESET => error.ConnectionResetByPeer,
else => windows.unexpectedWSAError(err),
},
};
Expand Down Expand Up @@ -1351,14 +1351,14 @@ pub const ShutdownError = posix.ShutdownError || error{

pub const WriteError = windows.WriteFileError || error{
Canceled,
ConnectionReset,
ConnectionResetByPeer,
Unexpected,
};

pub const ReadError = windows.ReadFileError || error{
EOF,
Canceled,
ConnectionReset,
ConnectionResetByPeer,
Unexpected,
};

Expand Down