mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Fix logout + autoReconnect loop
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user