bun
bun copied to clipboard
Concurrent fetch leads to ConnectionClosed fetch failed
What version of Bun is running?
0.4.0
What platform is your computer?
Darwin 22.1.0 arm64 arm
What steps can reproduce the bug?
// client.js
await Promise.all([...Array(200)].map(() => fetch('http://localhost:3000')));
// server.js
export default {
port: 3000,
fetch() {
return new Response("");
},
};
# keep this running
bun run server.js
bun run client.js
What is the expected behavior?
No failures. node client.js
works.
What do you see instead?
❯ bun run client.js
ConnectionClosed: fetch() failed
path: "http://localhost:3000"
Additional information
No response
This seems to happen after 174 simultaneous requests. It's not related to the server. Just the HTTP client.
This issue appears to be resolved in version 0.5.0. Closing.