Skip to content

Commit

Permalink
chore(ws): correct order for debug logs when identifying (#9248)
Browse files Browse the repository at this point in the history
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 22, 2023
1 parent bf507ab commit eb81dc9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/ws/src/ws/WebSocketShard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,10 @@ export class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> {
}

private async identify() {
this.debug(['Waiting for identify throttle']);

await this.strategy.waitForIdentify();

this.debug([
'Identifying',
`shard id: ${this.id.toString()}`,
Expand All @@ -366,8 +370,6 @@ export class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> {
`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,
Expand Down

2 comments on commit eb81dc9

@vercel
Copy link

@vercel vercel bot commented on eb81dc9 Mar 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on eb81dc9 Mar 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.