diff --git a/src/client/rest/handlers/RequestHandler.js b/src/client/rest/handlers/RequestHandler.js index d89c5b4a0..44427c80f 100644 --- a/src/client/rest/handlers/RequestHandler.js +++ b/src/client/rest/handlers/RequestHandler.js @@ -14,7 +14,7 @@ class RequestHandler { } get limited() { - return this.queue.length === 0 || this.manager.globallyRateLimited || this.remaining <= 0; + return this.manager.globallyRateLimited || this.remaining <= 0; } set globallyLimited(limited) { diff --git a/src/client/rest/handlers/burst.js b/src/client/rest/handlers/burst.js index b4e4fd2e3..8184d1037 100644 --- a/src/client/rest/handlers/burst.js +++ b/src/client/rest/handlers/burst.js @@ -1,5 +1,5 @@ module.exports = function burst() { - if (this.limited) return; + if (this.limited || this.queue.length === 0) return; this.execute(this.queue.shift()) .then(this.handle.bind(this)) .catch(({ timeout }) => { diff --git a/src/client/rest/handlers/sequential.js b/src/client/rest/handlers/sequential.js index 1f644dc17..efc10b058 100644 --- a/src/client/rest/handlers/sequential.js +++ b/src/client/rest/handlers/sequential.js @@ -1,5 +1,5 @@ module.exports = function sequential() { - if (this.busy || this.limited) return; + if (this.busy || this.limited || this.queue.length === 0) return; this.busy = true; this.execute(this.queue.shift()) .then(() => {