forked from Hri7566/mpp-server-dev2
Fix typo, clear interval to be safe
This commit is contained in:
parent
5d4bca7816
commit
e2f7e05014
|
@ -105,8 +105,9 @@ class Quota {
|
||||||
var allowance = params.allowance || this.allowance || Quota.PARAMS_OFFLINE.allowance;
|
var allowance = params.allowance || this.allowance || Quota.PARAMS_OFFLINE.allowance;
|
||||||
var max = params.max || this.max || Quota.PARAMS_OFFLINE.max;
|
var max = params.max || this.max || Quota.PARAMS_OFFLINE.max;
|
||||||
var maxHistLen = params.maxHistLen || this.maxHistLen || Quota.PARAMS_OFFLINE.maxHistLen;
|
var maxHistLen = params.maxHistLen || this.maxHistLen || Quota.PARAMS_OFFLINE.maxHistLen;
|
||||||
let interval = params.interval || 0
|
let interval = params.interval || 0;
|
||||||
this.inverval = setInterval(() => {
|
clearInterval(this.interval);
|
||||||
|
this.interval = setInterval(() => {
|
||||||
this.tick();
|
this.tick();
|
||||||
}, params.interval)
|
}, params.interval)
|
||||||
if (allowance !== this.allowance || max !== this.max || maxHistLen !== this.maxHistLen) {
|
if (allowance !== this.allowance || max !== this.max || maxHistLen !== this.maxHistLen) {
|
||||||
|
@ -155,4 +156,4 @@ class Quota {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = Quota
|
module.exports = Quota
|
||||||
|
|
Loading…
Reference in New Issue