Fix logout + autoReconnect loop

This commit is contained in:
abalabahaha
2016-04-22 18:04:28 -07:00
parent d18fcdbeea
commit ad338c6a29
2 changed files with 6 additions and 0 deletions

View File

@@ -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)

View File

@@ -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)