Skip to content

node:net: hold queued _writev chunks by reference instead of concat + native copy - #35940

Closed
robobun wants to merge 18 commits into
mainfrom
farm/4a2709d6/net-writev-no-concat
Closed

robobun wants to merge 18 commits into
mainfrom
farm/4a2709d6/net-writev-no-concat

test: reject serverRecv from the client error handler too

258f882
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 26, 2026 in 17m 35s

Code review found 1 potential issue

Found 1 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/js/node/net.ts:2860-2864 onWritevCloseBeforeReady uses wrong error code for kUpgradeAttached branch

Annotations

Check warning on line 2864 in src/js/node/net.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

onWritevCloseBeforeReady uses wrong error code for kUpgradeAttached branch

`onWritevCloseBeforeReady` unconditionally calls `$ERR_SOCKET_CLOSED_BEFORE_CONNECTION()`, but it's registered for both the `connecting` and `kUpgradeAttached` deferral branches — in the upgrade case the socket was already connected, and the sibling `_write` path uses `$ERR_SOCKET_CLOSED()` there (via `onUpgradeWriteClose`, net.ts:171-176). Since pre-PR `_writev` delegated to `_write`, a corked multi-chunk write closed during the upgrade window now gets a different error code than before and tha