mirror of
https://github.com/danbulant/discord.js
synced 2026-06-19 14:41:36 +00:00
Webpack build for branch master: b8018d4b6d
This commit is contained in:
parent
0e04cd7544
commit
c990fc3b7d
2 changed files with 4 additions and 3 deletions
|
|
@ -17649,13 +17649,13 @@ class WebSocketConnection extends EventEmitter {
|
|||
*/
|
||||
onClose(event) {
|
||||
this.debug(`${this.expectingClose ? 'Server' : 'Client'} closed WebSocket connection: ${event.code}`);
|
||||
this.expectingClose = false;
|
||||
this.closeSequence = this.sequence;
|
||||
// Reset the state before trying to fix anything
|
||||
this.emit('close', event);
|
||||
this.heartbeat(-1);
|
||||
// Should we reconnect?
|
||||
if (Constants.WSCodes[event.code]) {
|
||||
if (event.code === 1000 ? this.expectingClose : Constants.WSCodes[event.code]) {
|
||||
this.expectingClose = false;
|
||||
/**
|
||||
* Emitted when the client's WebSocket disconnects and will no longer attempt to reconnect.
|
||||
* @event Client#disconnect
|
||||
|
|
@ -17666,6 +17666,7 @@ class WebSocketConnection extends EventEmitter {
|
|||
this.destroy();
|
||||
return;
|
||||
}
|
||||
this.expectingClose = false;
|
||||
this.reconnect();
|
||||
}
|
||||
|
||||
|
|
|
|||
2
discord.master.min.js
vendored
2
discord.master.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue