From 618fa2b104cbaf0e5370454c8e95ab5f61734fcd Mon Sep 17 00:00:00 2001 From: SpaceEEC Date: Mon, 10 Jul 2017 03:34:54 +0200 Subject: [PATCH] functions for setTimeout should get the context bound and not applied (#1673) --- src/client/websocket/WebSocketConnection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/websocket/WebSocketConnection.js b/src/client/websocket/WebSocketConnection.js index 9567f5653..58878b3ea 100644 --- a/src/client/websocket/WebSocketConnection.js +++ b/src/client/websocket/WebSocketConnection.js @@ -444,7 +444,7 @@ class WebSocketConnection extends EventEmitter { * @returns {void} */ identify(after) { - if (after) return this.client.setTimeout(this.identify.apply(this), after); + if (after) return this.client.setTimeout(this.identify.bind(this), after); return this.sessionID ? this.identifyResume() : this.identifyNew(); }