diff --git a/server.ts b/server.ts index 44e93d1a6..8f280f6c2 100644 --- a/server.ts +++ b/server.ts @@ -116,6 +116,7 @@ const wss = new WebSocketServer({ server: server, path: '/tracker/socket' }) wss.on('connection', function (ws) { trackerServer.onWebSocketConnection(ws) }) +wss.on('error', err => logger.error('Error in websocket server.', err)) const onHttpRequest = trackerServer.onHttpRequest.bind(trackerServer) app.get('/tracker/announce', (req, res) => onHttpRequest(req, res, { action: 'announce' }))