mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
fix: invalid sessions should identify through manager
This commit is contained in:
@@ -172,9 +172,6 @@ export class DiscordenoShard {
|
||||
await this.connect()
|
||||
}
|
||||
|
||||
// Wait until an identify is free for this this.
|
||||
await this.requestIdentify()
|
||||
|
||||
this.send(
|
||||
{
|
||||
op: GatewayOpcodes.Identify,
|
||||
@@ -426,7 +423,7 @@ export class DiscordenoShard {
|
||||
|
||||
// When resumable is false we need to re-identify
|
||||
if (!resumable) {
|
||||
await this.identify()
|
||||
await this.requestIdentify()
|
||||
|
||||
break
|
||||
}
|
||||
|
||||
@@ -164,8 +164,7 @@ export function createGatewayManager(options: CreateGatewayManagerOptions): Gate
|
||||
},
|
||||
events: options.events,
|
||||
requestIdentify: async () => {
|
||||
// TODO: remove this entire concept, its much easier to do in reality.
|
||||
// await gateway.buckets.get(shardId % gateway.connection.sessionStartLimit.maxConcurrency)!.leak.acquire(shardId)
|
||||
return await gateway.identify(shardId);
|
||||
},
|
||||
shardIsReady: async () => {
|
||||
logger.debug(`[Shard] Shard #${shardId} is ready`)
|
||||
|
||||
Reference in New Issue
Block a user