usockets: keep READABLE off a half-open socket whose on_end already fired - #35939
Closed
robobun wants to merge 5 commits into
Closed
usockets: keep READABLE off a half-open socket whose on_end already fired#35939robobun wants to merge 5 commits into
robobun wants to merge 5 commits into
Claude / Claude Code Review
completed
Jul 26, 2026 in 19m 47s
Code review found 1 potential issue
Found 2 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | test/js/bun/net/tcp-server.test.ts:366 |
drainCount assertion may flake on Windows; '4 MiB' comment is stale |
Annotations
Check warning on line 366 in test/js/bun/net/tcp-server.test.ts
claude / Claude Code Review
drainCount assertion may flake on Windows; '4 MiB' comment is stale
The comment at line 317 still says "4 MiB write" but `PAYLOAD` is now 256 KiB, and the `expect(drainCount).toBeGreaterThanOrEqual(1)` this comment justifies is not covered by the SO_SNDBUF clamp on Windows — `setSocketOptions` is a no-op there (`#[cfg(not(unix))]` at `src/runtime/socket/socket_body.rs:4841-4849`), so a 256 KiB write against unclamped Winsock buffering may be fully accepted in `end()` and drain never fires. The first iteration (384603ee) deliberately did not assert `drainCount` f
Loading