Skip to content

Bun.serve http2: close a connection gracefully with a FIN, not with close(2) - #44874

Closed
robobun wants to merge 1 commit into
mainfrom
robobun/bff2155a/h2-graceful-close-path
Closed

robobun wants to merge 1 commit into
mainfrom
robobun/bff2155a/h2-graceful-close-path

Bun.serve http2: close a connection gracefully with a FIN, not with c…

3d906a7
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Oct 9, 2026 in 21m 58s

Code review found 2 important issues

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

Details

Severity Count
🔴 Important 2
🟡 Nit 3
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important packages/bun-uws/src/Http2Context.h:838 Operators calling await server.stop() can wait forever on an HTTP/2 connection whose GOAWAY the kernel did not take, whe
🔴 Important test/js/bun/http/serve-http2-lifecycle.test.ts:649 Maintainers get a lifecycle file that now spends roughly 30 s of serial wall-clock waiting on timers, with new per-test
🟡 Nit test/js/bun/http/serve-http2-fixture.ts:341 nit: dynamic require inside request handlers sweep:'require/("bun:internal-for-testing"/)' is what test/CLAUDE.md asks t
🟡 Nit test/js/bun/http/serve-http2-fixture.ts:299 nit: a test that fails before it creates the release file now hangs until the runner's timeout instead of reporting its
🟡 Nit test/js/bun/http/serve-http2-lifecycle.test.ts:631 nit: the new graceful-close tests run serially although each starts its own fixture, so the file takes well over the ~10