diff --git a/client/connection.js b/client/connection.js index 69eb810..9a76e7d 100644 --- a/client/connection.js +++ b/client/connection.js @@ -55,7 +55,7 @@ Connection.prototype.onOpen = function() { this.retryCounter = 0; clearTimeout(this.heartbeatTimer); - this.heartbeatTimer = setTimeout(this.ws.send.bind(null, { type: 'heartbeat' }), 30000); + this.heartbeatTimer = setTimeout(() => { this.ws.send({ type: 'heartbeat' }); }, 30000); const evt = new Event('L-conn-open'); document.dispatchEvent(evt);