From 379061987c786a0870c21bb858612e40a37215ed Mon Sep 17 00:00:00 2001 From: Lewdcario Date: Fri, 11 May 2018 19:27:34 -0500 Subject: [PATCH] fix: burst request mode hanging permanently --- src/client/rest/RequestHandlers/Burst.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/rest/RequestHandlers/Burst.js b/src/client/rest/RequestHandlers/Burst.js index 0bbae51c2..8f8e309d5 100644 --- a/src/client/rest/RequestHandlers/Burst.js +++ b/src/client/rest/RequestHandlers/Burst.js @@ -62,7 +62,8 @@ class BurstRequestHandler extends RequestHandler { handle() { super.handle(); - if (this.remaining <= 0 || this.queue.length === 0 || this.globalLimit) return; + if (this.queue.length === 0) return; + if ((this.remaining <= 0 || this.globalLimit) && Date.now() - this.timeDifference < this.resetTime) return; this.execute(this.queue.shift()); this.remaining--; this.handle();