chore(ws): correct order for debug logs when identifying (#9248)

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
DD
2023-03-22 21:13:56 +02:00
committed by GitHub
parent bf507ab265
commit eb81dc982c

View File

@@ -358,6 +358,10 @@ export class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> {
} }
private async identify() { private async identify() {
this.debug(['Waiting for identify throttle']);
await this.strategy.waitForIdentify();
this.debug([ this.debug([
'Identifying', 'Identifying',
`shard id: ${this.id.toString()}`, `shard id: ${this.id.toString()}`,
@@ -366,8 +370,6 @@ export class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> {
`compression: ${this.inflate ? 'zlib-stream' : this.useIdentifyCompress ? 'identify' : 'none'}`, `compression: ${this.inflate ? 'zlib-stream' : this.useIdentifyCompress ? 'identify' : 'none'}`,
]); ]);
await this.strategy.waitForIdentify();
const d: GatewayIdentifyData = { const d: GatewayIdentifyData = {
token: this.strategy.options.token, token: this.strategy.options.token,
properties: this.strategy.options.identifyProperties, properties: this.strategy.options.identifyProperties,