Add basic websocket error handler as emergency fix for site crashing

This commit is contained in:
wiz 2020-11-15 11:43:34 +09:00
parent 1e39daafb3
commit 12b3ecd078
No known key found for this signature in database
GPG Key ID: A394E332255A6173

View File

@ -29,6 +29,7 @@ class WebsocketHandler {
}
this.wss.on('connection', (client: WebSocket) => {
client.on('error', logger.info);
client.on('message', (message: string) => {
try {
const parsedMessage: WebsocketResponse = JSON.parse(message);