diff --git a/lib/agent/plugins/control-panel/websockets/index.js b/lib/agent/plugins/control-panel/websockets/index.js index 10a5798a9..9ab1e8157 100644 --- a/lib/agent/plugins/control-panel/websockets/index.js +++ b/lib/agent/plugins/control-panel/websockets/index.js @@ -22,7 +22,7 @@ let hooks; let config; let ws; let pingTimeout; -let pingPongTimeout; +let pingInterval; let emitter; let setAliveTimeInterval = null; let setIntervalWSStatus = null; @@ -253,7 +253,7 @@ exports.startWebsocket = () => { }); ws.on('ping', () => { - heartbeatTimed(); + exports.heartbeatTimed(); if (!ws || !ws.readyState || ws.readyState !== 1) return; ws.pong(); });