aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server.ts1
1 files changed, 1 insertions, 0 deletions
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' })
116wss.on('connection', function (ws) { 116wss.on('connection', function (ws) {
117 trackerServer.onWebSocketConnection(ws) 117 trackerServer.onWebSocketConnection(ws)
118}) 118})
119wss.on('error', err => logger.error('Error in websocket server.', err))
119 120
120const onHttpRequest = trackerServer.onHttpRequest.bind(trackerServer) 121const onHttpRequest = trackerServer.onHttpRequest.bind(trackerServer)
121app.get('/tracker/announce', (req, res) => onHttpRequest(req, res, { action: 'announce' })) 122app.get('/tracker/announce', (req, res) => onHttpRequest(req, res, { action: 'announce' }))