fix monitor.stop() in some cases

This commit is contained in:
LouisLam 2021-09-08 20:00:16 +08:00
parent a7b50c3630
commit 6006038689

View File

@ -309,14 +309,18 @@ class Monitor extends BeanModel {
previousBeat = bean;
if (! this.isStop) {
this.heartbeatInterval = setTimeout(beat, this.interval * 1000);
}
}
beat();
}
stop() {
clearTimeout(this.heartbeatInterval);
this.isStop = true;
}
/**