mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
src: fix random broken reconnects (#3233)
This commit is contained in:
@@ -311,11 +311,15 @@ class WebSocketShard extends EventEmitter {
|
||||
onClose(event) {
|
||||
this.closeSequence = this.sequence;
|
||||
this.sequence = -1;
|
||||
|
||||
this.debug(`WebSocket was closed.
|
||||
Event Code: ${event.code}
|
||||
Clean: ${event.wasClean}
|
||||
Reason: ${event.reason || 'No reason received'}`);
|
||||
|
||||
this.setHeartbeatTimer(-1);
|
||||
this.setHelloTimeout(-1);
|
||||
|
||||
this.status = Status.DISCONNECTED;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user