Skip to content

Commit

Permalink
Fix max_concurrency for real this time (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brainicism authored Jun 20, 2021
1 parent 38a2283 commit 2c15eab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ class Client extends EventEmitter {
try {
const data = await (this.options.maxShards === "auto" ? this.getBotGateway() : this.getGateway());
this.shards.maxConcurrency = this.options.maxShards === "auto" ? data.session_start_limit.max_concurrency : 1;
this._client.options.useMaxConcurrency = this._client.options.useMaxConcurrency && this.shards.maxConcurrency !== 1;
this.options.useMaxConcurrency = this.options.useMaxConcurrency && this.shards.maxConcurrency !== 1;
if(!data.url || (this.options.maxShards === "auto" && !data.shards)) {
throw new Error("Invalid response from gateway REST call");
}
Expand Down

0 comments on commit 2c15eab

Please sign in to comment.