Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: provide config idle timeout for bun runtime. #2984

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/presets/bun/runtime/bun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const ws = import.meta._websocket

// @ts-expect-error
const server = Bun.serve({
idleTimeout: process.env.NITRO_SHUTDOWN_TIMEOUT || 10,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not exactly same options, we need bun specific environment variable for this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NITRO_BUN_IDLE_TIMEOUT is good for this, isn't it?

btw, luckily, i can use bun patch to overcome this for now. so, no need to rush to fix this as soon as possible in my side.

port: process.env.NITRO_PORT || process.env.PORT || 3000,
websocket: import.meta._websocket ? ws!.websocket : (undefined as any),
async fetch(req: Request, server: any) {
Expand Down
Loading