mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +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) {
|
switch (code) {
|
||||||
case CloseCodes.Normal: {
|
case CloseCodes.Normal: {
|
||||||
this.debug([`Disconnected normally from code ${code}`]);
|
this.debug([`Disconnected normally from code ${code}`]);
|
||||||
if (this.status === WebSocketShardStatus.Ready) {
|
return this.destroy({
|
||||||
return this.destroy({
|
code,
|
||||||
code,
|
reason: 'Got disconnected by Discord',
|
||||||
reason: 'Got disconnected by Discord',
|
recover: WebSocketShardDestroyRecovery.Reconnect,
|
||||||
recover: WebSocketShardDestroyRecovery.Reconnect,
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case CloseCodes.Resuming: {
|
case CloseCodes.Resuming: {
|
||||||
|
|||||||
Reference in New Issue
Block a user