bugfix
This commit is contained in:
parent
c762182e2a
commit
4eaefa3279
@ -63,7 +63,7 @@ class RateLimiter {
|
|||||||
if (now - lastDelete < this.deleteInterval) {
|
if (now - lastDelete < this.deleteInterval) {
|
||||||
const timeout = this.deleteTimeouts[channel.id];
|
const timeout = this.deleteTimeouts[channel.id];
|
||||||
if (!timeout || timeout._destroyed)
|
if (!timeout || timeout._destroyed)
|
||||||
this.deleteTimeouts[channel.id] = setTimeout(this.delete.bind(this), this.deleteInterval * 1000, channel);
|
this.deleteTimeouts[channel.id] = setTimeout(this._delete.bind(this), this.deleteInterval * 1000, channel);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.lastDelete[channel.id] = now;
|
this.lastDelete[channel.id] = now;
|
||||||
@ -76,7 +76,7 @@ class RateLimiter {
|
|||||||
rejects.push(reject);
|
rejects.push(reject);
|
||||||
this.deleteQueue[channel.id].shift();
|
this.deleteQueue[channel.id].shift();
|
||||||
} else { // left over messages go in next batch
|
} else { // left over messages go in next batch
|
||||||
this.deleteTimeouts[channel.id] = setTimeout(this.delete.bind(this), this.deleteInterval * 1000, channel);
|
this.deleteTimeouts[channel.id] = setTimeout(this._delete.bind(this), this.deleteInterval * 1000, channel);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user