mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 01:40:08 +00:00
fix(gw): thx dv8. invalid condition on identify
This commit is contained in:
@@ -4,7 +4,7 @@ import { Shard, ShardSocketCloseCodes, ShardState } from "./types.ts";
|
||||
export async function identify(shard: Shard): Promise<void> {
|
||||
// A new identify has been requested even though there is already a connection open.
|
||||
// Therefore we need to close the old connection and heartbeating before creating a new one.
|
||||
if (shard.state === ShardState.Connected) {
|
||||
if (shard.isOpen()) {
|
||||
console.log("CLOSING EXISTING SHARD: #" + shard.id);
|
||||
shard.close(ShardSocketCloseCodes.ReIdentifying, "Re-identifying closure of old connection.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user