mirror of
https://github.com/mempool/mempool.git
synced 2025-01-17 18:52:34 +01:00
Add basic websocket error handler as emergency fix for site crashing
This commit is contained in:
parent
1e39daafb3
commit
12b3ecd078
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user