mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +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() {
|
||||
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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue