Skip to content

Graceful WebSocket shutdown during app termination

Choose a tag to compare

@github-actions github-actions released this 26 Sep 08:22
· 24 commits to main since this release

When an AdonisJS app terminates, Socket now closes connected WebSocket clients with code 1001 Going Away before the HTTP server drains in-flight requests. Clients that do not complete the close handshake are forcibly disconnected, so open WebSockets cannot keep shutdown waiting. The transport remains available until provider shutdown.

The built-in client reconnects automatically and restores its desired channel subscriptions. Direct SocketService.close() continues to use 1012 Service Restart.

Channel patterns now use @boringnode/route-matcher for matching, with specificity-based precedence when patterns overlap. Wildcard parameters are returned as decoded, slash-separated values.