mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 03:18:17 +00:00
only close if open
This commit is contained in:
@@ -10,7 +10,7 @@ export async function tellClusterToIdentify(
|
||||
const oldShard = ws.shards.get(shardId);
|
||||
await ws.identify(shardId, ws.maxShards);
|
||||
|
||||
if (oldShard) {
|
||||
if (oldShard?.ws.readyState === WebSocket.OPEN) {
|
||||
oldShard.ws.close(3065, "Resharded!");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user