From c0e9ce2a1dc2f86755def2b7e0c025fe191c558b 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 d723ac79a..a8a6cb16f 100644 --- a/src/client/websocket/WebSocketConnection.js +++ b/src/client/websocket/WebSocketConnection.js @@ -445,7 +445,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(); }