Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
6 changes: 3 additions & 3 deletions src/adapter/bun/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,9 @@ export const BunAdapter: ElysiaAdapter = {

if (callback) callback(app.server!)

process.on('beforeExit', () => {
process.on('beforeExit', async () => {
if (app.server) {
app.server.stop?.()
await app.server.stop?.()
app.server = null

if (app.event.stop)
Expand Down Expand Up @@ -416,7 +416,7 @@ export const BunAdapter: ElysiaAdapter = {
},
async stop(app, closeActiveConnections) {
if (app.server) {
app.server.stop(closeActiveConnections)
await app.server.stop(closeActiveConnections)
app.server = null

if (app.event.stop?.length)
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/web-standard/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const WebStandardAdapter: ElysiaAdapter = {
)

if (app.server) {
app.server.stop(closeActiveConnections)
await app.server.stop(closeActiveConnections)
app.server = null

if (app.event.stop?.length)
Expand Down
Loading