Environment
Reproduction
The bug is very obvious. If you absolutely insist I can make a reproduction, but the problem is immediately clear by looking at the code, it uses || which doesn't account for 0.
Describe the bug
NITRO_BUN_IDLE_TIMEOUT=0 is treated as it's undefined (due to a flaw in implementation) and is effectively ignored. As such, the default timeout of 10 seconds is used.
This is incorrect; 0 is a valid value that disables the timeout entirely. Bun documentation specifically advises to use 0 for streaming & SSE:
Streaming & Server-Sent Events — The idle timer applies while a response is being streamed. If your stream goes quiet for longer than idleTimeout, the connection will be closed mid-response. For long-lived streams, disable the timeout for that request with server.timeout(req, 0).
Additional context
The fix is trivial, I will submit the PR.
Logs
Environment
nitropack@2.13.1Reproduction
The bug is very obvious. If you absolutely insist I can make a reproduction, but the problem is immediately clear by looking at the code, it uses
||which doesn't account for 0.Describe the bug
NITRO_BUN_IDLE_TIMEOUT=0is treated as it's undefined (due to a flaw in implementation) and is effectively ignored. As such, the default timeout of 10 seconds is used.This is incorrect; 0 is a valid value that disables the timeout entirely. Bun documentation specifically advises to use 0 for streaming & SSE:
Additional context
The fix is trivial, I will submit the PR.
Logs