mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
src: fix random broken reconnects (#3233)
This commit is contained in:
parent
de79bba965
commit
577636a46d
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue