diff options
author | Chocobozzz <me@florianbigard.com> | 2018-02-09 10:34:11 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-02-09 10:34:11 +0100 |
commit | bc4c766aca72c2b09b555895452b9b3e25cd85fe (patch) | |
tree | 60c0df8a10317e325c76c6ee6e207f8c69f48c2f | |
parent | c525c093751aba9f1152adbe405daae20a0dc400 (diff) | |
download | PeerTube-bc4c766aca72c2b09b555895452b9b3e25cd85fe.tar.gz PeerTube-bc4c766aca72c2b09b555895452b9b3e25cd85fe.tar.zst PeerTube-bc4c766aca72c2b09b555895452b9b3e25cd85fe.zip |
Handle error on websocket error
-rw-r--r-- | server.ts | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -116,6 +116,7 @@ const wss = new WebSocketServer({ server: server, path: '/tracker/socket' }) | |||
116 | wss.on('connection', function (ws) { | 116 | wss.on('connection', function (ws) { |
117 | trackerServer.onWebSocketConnection(ws) | 117 | trackerServer.onWebSocketConnection(ws) |
118 | }) | 118 | }) |
119 | wss.on('error', err => logger.error('Error in websocket server.', err)) | ||
119 | 120 | ||
120 | const onHttpRequest = trackerServer.onHttpRequest.bind(trackerServer) | 121 | const onHttpRequest = trackerServer.onHttpRequest.bind(trackerServer) |
121 | app.get('/tracker/announce', (req, res) => onHttpRequest(req, res, { action: 'announce' })) | 122 | app.get('/tracker/announce', (req, res) => onHttpRequest(req, res, { action: 'announce' })) |