mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-03 19:54:04 +00:00
fix monitor.stop() in some cases
This commit is contained in:
parent
a7b50c3630
commit
6006038689
1 changed files with 5 additions and 1 deletions
|
@ -309,14 +309,18 @@ class Monitor extends BeanModel {
|
||||||
|
|
||||||
previousBeat = bean;
|
previousBeat = bean;
|
||||||
|
|
||||||
|
if (! this.isStop) {
|
||||||
this.heartbeatInterval = setTimeout(beat, this.interval * 1000);
|
this.heartbeatInterval = setTimeout(beat, this.interval * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
beat();
|
beat();
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
clearTimeout(this.heartbeatInterval);
|
clearTimeout(this.heartbeatInterval);
|
||||||
|
this.isStop = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue