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

Add closeActiveConnections to server.stop(), like exists in native bun #807

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

Flaque
Copy link
Contributor

@Flaque Flaque commented Aug 31, 2024

This fixes #806, by adding support for Bun server's native closeActiveConnections?: boolean option on server.stop().

const app = new Elysia()
     .get("/", () => 'hi')
     .listen(3000)

// The boolean argument here is optional, new, and mimics native bun.
app.stop(true) // Abruptly any requests inflight

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The server is still running after server.stop()
2 participants