add missing CONNECTION_REFUSED and CONNECTION_RESET errors for windows

Adds missing errors CONNECTION_REFUSED for netConnectIpWindows and
CONNECTION_RESET for both netReadWindows and netWriteWindows.  I'm able
to induce these 3 errors on my Windows 11 machine.
This commit is contained in:
Jonathan Marler
2026-04-22 10:35:05 -06:00
committed by Andrew Kelley
parent fb9ba5e4b3
commit 23bcb8148f
+3
View File
@@ -12255,6 +12255,7 @@ fn netConnectIpWindows(
.SUCCESS => {},
.CANCELLED => unreachable,
.INSUFFICIENT_RESOURCES => return error.SystemResources,
.CONNECTION_REFUSED => return error.ConnectionRefused,
else => |status| return windows.unexpectedStatus(status),
}
return .{ .handle = socket_handle, .address = bound_address };
@@ -12792,6 +12793,7 @@ fn netReadWindows(socket_handle: net.Socket.Handle, data: [][]u8) net.Stream.Rea
.SUCCESS => return iosb.Information,
.CANCELLED => unreachable,
.INSUFFICIENT_RESOURCES => return error.SystemResources,
.CONNECTION_RESET => return error.ConnectionResetByPeer,
else => |status| return windows.unexpectedStatus(status),
}
}
@@ -13301,6 +13303,7 @@ fn netWriteWindows(
.SUCCESS => return iosb.Information,
.CANCELLED => unreachable,
.INSUFFICIENT_RESOURCES => return error.SystemResources,
.CONNECTION_RESET => return error.ConnectionResetByPeer,
else => |status| return windows.unexpectedStatus(status),
}
}