From eb81dc982cf44af01246ae9e881938068669f15e Mon Sep 17 00:00:00 2001 From: DD Date: Wed, 22 Mar 2023 21:13:56 +0200 Subject: [PATCH] chore(ws): correct order for debug logs when identifying (#9248) Co-authored-by: Vlad Frangu Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- packages/ws/src/ws/WebSocketShard.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/ws/src/ws/WebSocketShard.ts b/packages/ws/src/ws/WebSocketShard.ts index 11e6ebba2..5cdd15a33 100644 --- a/packages/ws/src/ws/WebSocketShard.ts +++ b/packages/ws/src/ws/WebSocketShard.ts @@ -358,6 +358,10 @@ export class WebSocketShard extends AsyncEventEmitter { } private async identify() { + this.debug(['Waiting for identify throttle']); + + await this.strategy.waitForIdentify(); + this.debug([ 'Identifying', `shard id: ${this.id.toString()}`, @@ -366,8 +370,6 @@ export class WebSocketShard extends AsyncEventEmitter { `compression: ${this.inflate ? 'zlib-stream' : this.useIdentifyCompress ? 'identify' : 'none'}`, ]); - await this.strategy.waitForIdentify(); - const d: GatewayIdentifyData = { token: this.strategy.options.token, properties: this.strategy.options.identifyProperties,