mirror of
https://github.com/danbulant/discord.js
synced 2026-06-19 06:31:20 +00:00
Fix logout + autoReconnect loop
This commit is contained in:
parent
d18fcdbeea
commit
ad338c6a29
2 changed files with 6 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue