feature: allow sweeping of inactive request buckets

This commit is contained in:
Amish Shah
2018-05-02 17:57:48 +01:00
parent 745669a7c9
commit b5f37728a7
5 changed files with 35 additions and 13 deletions

View File

@@ -11,19 +11,6 @@ class BaseClient extends EventEmitter {
constructor(options = {}) {
super();
/**
* The options the client was instantiated with
* @type {ClientOptions}
*/
this.options = Util.mergeDefault(DefaultOptions, options);
/**
* The REST manager of the client
* @type {RESTManager}
* @private
*/
this.rest = new RESTManager(this, options._tokenType);
/**
* Timeouts set by {@link BaseClient#setTimeout} that are still active
* @type {Set<Timeout>}
@@ -37,6 +24,19 @@ class BaseClient extends EventEmitter {
* @private
*/
this._intervals = new Set();
/**
* The options the client was instantiated with
* @type {ClientOptions}
*/
this.options = Util.mergeDefault(DefaultOptions, options);
/**
* The REST manager of the client
* @type {RESTManager}
* @private
*/
this.rest = new RESTManager(this, options._tokenType);
}
/**