oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.35k stars 2.78k forks source link

Abort signal not working when connection fails #15275

Closed arthurvanl closed 2 days ago

arthurvanl commented 2 days ago

What version of Bun is running?

1.1.35

What steps can reproduce the bug?

// fetch anything that doesn't actually connect
await fetch("http://192.168.99.99/", {
    signal: AbortSignal.timeout(1000),
});

What is the expected behavior?

Exit after 1000ms like node.

What do you see instead?

As if the AbortSignal wasn't present - just the default longer timeout.

Original issue ![Image](https://github.com/user-attachments/assets/8c91e6bb-3b63-4040-8242-b6b88cdd3d7d) ![Image](https://github.com/user-attachments/assets/d43c43ee-75c7-4686-9bb7-8ea0ec584933) You can still try to use the url: http://v154.mintyserver.nl:9000/api/v1/query?query=node_filesystem_avail_bytes
RiskyMH commented 2 days ago

Duplicate of #13302