mirror of
https://github.com/Xahau/Validation-Ledger-Tx-Store-to-xPOP.git
synced 2025-11-20 11:45:51 +00:00
Close websocket server client connections on sigint
This commit is contained in:
@@ -103,6 +103,7 @@ if (!wss) {
|
|||||||
// Play nice with Docker etc.
|
// Play nice with Docker etc.
|
||||||
process.on('SIGINT', () => {
|
process.on('SIGINT', () => {
|
||||||
console.log('Shutting down webserver')
|
console.log('Shutting down webserver')
|
||||||
|
wss.getWss().clients.forEach(client => client.close())
|
||||||
server.close()
|
server.close()
|
||||||
wss.getWss().close()
|
wss.getWss().close()
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user