From 290b391bf84921dc4079e2c6be42bf74d1f92040 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Wed, 14 Mar 2018 20:26:40 -0600 Subject: [PATCH] Fix TypeError: cb is not a function during ping --- core/servers/login/websocket.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/servers/login/websocket.js b/core/servers/login/websocket.js index 378af7ef..cc0270b1 100644 --- a/core/servers/login/websocket.js +++ b/core/servers/login/websocket.js @@ -77,7 +77,7 @@ function WebSocketClient(ws, req, serverType) { // // Montior connection status with ping/pong // - ws.on('pong', () => { + ws.on('pong', () => { Log.trace(`Pong from ${this.socketBridge.remoteAddress}`); ws.isConnectionAlive = true; }); @@ -187,13 +187,13 @@ exports.getModule = class WebSocketLoginServer extends LoginServerModule { } ws.isConnectionAlive = false; // pong will reset this - + Log.trace('Ping to remote WebSocket client'); - return ws.ping('', false, true); + return ws.ping('', false); // false=don't mask }); } }); - }, 30000); + }, 30000); return true; }