refactor: remove timer utilities from Client (#6113)

This commit is contained in:
Antonio Román
2021-07-16 14:31:25 +02:00
committed by GitHub
parent f200f14a40
commit 5ca97c9351
13 changed files with 47 additions and 145 deletions

View File

@@ -18,10 +18,9 @@ class RESTManager {
this.globalReset = null;
this.globalDelay = null;
if (client.options.restSweepInterval > 0) {
const interval = client.setInterval(() => {
this.sweepInterval = setInterval(() => {
this.handlers.sweep(handler => handler._inactive);
}, client.options.restSweepInterval * 1000);
interval.unref();
}, client.options.restSweepInterval * 1000).unref();
}
}