mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(WebSocketShard): always reconnect on disconnected with 1000 (#8405)
This commit is contained in:
@@ -462,15 +462,11 @@ export class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> {
|
||||
switch (code) {
|
||||
case CloseCodes.Normal: {
|
||||
this.debug([`Disconnected normally from code ${code}`]);
|
||||
if (this.status === WebSocketShardStatus.Ready) {
|
||||
return this.destroy({
|
||||
code,
|
||||
reason: 'Got disconnected by Discord',
|
||||
recover: WebSocketShardDestroyRecovery.Reconnect,
|
||||
});
|
||||
}
|
||||
|
||||
break;
|
||||
return this.destroy({
|
||||
code,
|
||||
reason: 'Got disconnected by Discord',
|
||||
recover: WebSocketShardDestroyRecovery.Reconnect,
|
||||
});
|
||||
}
|
||||
|
||||
case CloseCodes.Resuming: {
|
||||
|
||||
Reference in New Issue
Block a user