mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
fix reconnecting
This commit is contained in:
@@ -313,7 +313,7 @@ class WebSocketManager extends EventEmitter {
|
||||
* Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.
|
||||
*/
|
||||
tryReconnect() {
|
||||
if (this.status === Constants.Status.RECONNECTING) return;
|
||||
if (this.status === Constants.Status.RECONNECTING || this.status === Constants.Status.CONNECTING) return;
|
||||
this.status = Constants.Status.RECONNECTING;
|
||||
this.ws.close();
|
||||
this.packetManager.handleQueue();
|
||||
|
||||
Reference in New Issue
Block a user