From ad338c6a299b39403f4db91f0d5b5d5f40e3619e Mon Sep 17 00:00:00 2001 From: abalabahaha Date: Fri, 22 Apr 2016 18:04:28 -0700 Subject: [PATCH] Fix logout + autoReconnect loop --- lib/Client/InternalClient.js | 3 +++ src/Client/InternalClient.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lib/Client/InternalClient.js b/lib/Client/InternalClient.js index 318dde035..c6a5c2234 100644 --- a/lib/Client/InternalClient.js +++ b/lib/Client/InternalClient.js @@ -252,6 +252,9 @@ var InternalClient = (function () { if (autoReconnect) { this.autoReconnectInterval = Math.min(this.autoReconnectInterval * (Math.random() + 1), 60000); setTimeout(function () { + if (!_this2.email && !_this2.token) { + return; + } _this2.setup(); // Check whether the email is set (if not, only a token has been used for login) diff --git a/src/Client/InternalClient.js b/src/Client/InternalClient.js index e60b769f9..c292918ad 100644 --- a/src/Client/InternalClient.js +++ b/src/Client/InternalClient.js @@ -173,6 +173,9 @@ export default class InternalClient { if (autoReconnect) { this.autoReconnectInterval = Math.min(this.autoReconnectInterval * (Math.random() + 1), 60000); setTimeout(() => { + if(!this.email && !this.token) { + return; + } this.setup(); // Check whether the email is set (if not, only a token has been used for login)