mirror of
https://github.com/Cameri/nostream.git
synced 2025-04-10 04:39:07 +02:00
chore: improve wss adapter cleanup
This commit is contained in:
parent
525630a49c
commit
6cf2b8cddf
@ -73,13 +73,13 @@ export class WebSocketServerAdapter extends WebServerAdapter implements IWebSock
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
protected onClose() {
|
||||
this.webSocketServer.clients.forEach((webSocket: WebSocket) =>
|
||||
webSocket.terminate()
|
||||
)
|
||||
console.debug(`worker ${process.pid} - websocket server closing`)
|
||||
clearInterval(this.heartbeatInterval)
|
||||
this.removeAllListeners()
|
||||
this.webSocketServer.removeAllListeners()
|
||||
super.onClose()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user