Skip to content

Instantly share code, notes, and snippets.

@shuuheyhey
shuuheyhey / README.md
Created October 12, 2026 06:43
Miniflare unread Response bodies cancelled by Undici GC: Node reproduction and proposed fix

Miniflare unread response garbage collection reproduction

A local HTTP server returns {"message":"hello"}. Keep all 20 Miniflare Responses reachable, yield across 10 explicit GC cycles, then read their bodies. There are no remote services, credentials, workerd startup, fixed sleeps, or retries.

Tested with Miniflare 5.20261006.1-alpha, Undici 7.29.1, Node.js 24.19.0 and 26.11.0 on macOS 26.6.2 arm64. Bun 1.4.3 is used only to install dependencies; Node runs the reproduction.