From 1fc4479c18dd204b80abd43f34c04fa73a1db91c Mon Sep 17 00:00:00 2001 From: Ben Burlingham Date: Sun, 19 Jul 2020 11:31:50 -0700 Subject: [PATCH] Invocation fix. --- client/connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);