mirror of
https://github.com/danbulant/discord.js
synced 2026-07-08 20:51:14 +00:00
fix: burst request mode hanging permanently
This commit is contained in:
parent
de7d90ada3
commit
379061987c
1 changed files with 2 additions and 1 deletions
|
|
@ -62,7 +62,8 @@ class BurstRequestHandler extends RequestHandler {
|
||||||
|
|
||||||
handle() {
|
handle() {
|
||||||
super.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.execute(this.queue.shift());
|
||||||
this.remaining--;
|
this.remaining--;
|
||||||
this.handle();
|
this.handle();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue