Close websocket server client connections on sigint

This commit is contained in:
Wietse Wind
2023-10-07 01:51:02 +02:00
parent 900fc1ea98
commit 2bc3b1c89b

View File

@@ -103,6 +103,7 @@ if (!wss) {
// Play nice with Docker etc.
process.on('SIGINT', () => {
console.log('Shutting down webserver')
wss.getWss().clients.forEach(client => client.close())
server.close()
wss.getWss().close()
})