Skip to content

Bun.serve: abort a request whose connection closed while its handler was being dispatched - #40034

Merged
Jarred-Sumner merged 7 commits into
mainfrom
farm/110d8f88/serve-close-during-dispatch
Aug 22, 2026
Merged

Bun.serve: abort a request whose connection closed while its handler was being dispatched#40034
Jarred-Sumner merged 7 commits into
mainfrom
farm/110d8f88/serve-close-during-dispatch

Shorten the new doc comments to one line each

5ad830b
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 22, 2026 in 14m 36s

Code review found 1 important issue

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

Details

Severity Count
🔴 Important 1
🟡 Nit 0
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important test/js/bun/http/serve-pending-promise-abort-leak.test.ts:643-645 New close-during-dispatch tests segfault on Windows CI — need isWindows gate

Annotations

Check failure on line 645 in test/js/bun/http/serve-pending-promise-abort-leak.test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

New close-during-dispatch tests segfault on Windows CI — need isWindows gate

The three new close-during-dispatch test blocks (`test.each(closeDuringDispatchCases)` here, `test.each(closeWindows)` body-in-flight below, and the late-resolve subprocess test) segfault on both Windows CI targets — robobun reports pid 6104/7788 segmentation fault on 🪟 2019 x64 and 🪟 11 aarch64 for commit 5ad830b. The PR description acknowledges why: the Windows libuv backend does not yet keep closed sockets allocated across a nested tick (#40021/#40023 open). Import `isWindows` from `h