server icon indicating copy to clipboard operation
server copied to clipboard

Server does not shutdown properly

Open s074 opened this issue 9 months ago • 0 comments

Describe the bug Currently a server shutdown does not await for websocket connections to close. This means that certain session cleanup code in the websocket Close event does not get executed

We probably need to await this: https://github.com/spacebarchat/server/blob/f03c6209a42ae3e922bdb86954de04f1ae6daaa8/src/gateway/Server.ts#L85

To Reproduce Steps to reproduce the behavior:

  1. Shutdown the server
  2. Server will shutdown immediately without waiting for websocket connections to close

Expected behavior The server should wait for websocket connections to close before shutting down

s074 avatar Jun 21 '25 23:06 s074