node:net: publish diagnostics_channel events (net.client.socket, net.server.socket, net.server.listen) - #34209
Open
robobun wants to merge 4 commits into
Open
node:net: publish diagnostics_channel events (net.client.socket, net.server.socket, net.server.listen)#34209robobun wants to merge 4 commits into
robobun wants to merge 4 commits into
Claude / Claude Code Review
completed
Jul 15, 2026 in 16m 33s
Code review found 1 potential issue
Found 3 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:3455-3462 |
netServerListen.error not published on cluster-worker listen failure |
Annotations
Check warning on line 3462 in src/js/node/net.ts
claude / Claude Code Review
netServerListen.error not published on cluster-worker listen failure
In a cluster worker, `listenInCluster` calls `cluster._getServer` (async IPC) and `listenOnPrimaryHandle` runs after this try/catch has already returned — so a throw from `checkBindError` (net.ts:3675) or `kRealListen` on that path never reaches this `netServerListen.error.publish`, leaving subscribers with an `asyncStart` and no matching `error`/`asyncEnd`. Node avoids this by publishing from inside `setupListenHandle` itself, which both the primary and worker paths reach; mirroring that (or wr
Loading