mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-01 15:30:52 +01:00
fix monitor.stop() in some cases
This commit is contained in:
parent
a7b50c3630
commit
6006038689
@ -309,7 +309,10 @@ class Monitor extends BeanModel {
|
||||
|
||||
previousBeat = bean;
|
||||
|
||||
this.heartbeatInterval = setTimeout(beat, this.interval * 1000);
|
||||
if (! this.isStop) {
|
||||
this.heartbeatInterval = setTimeout(beat, this.interval * 1000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
beat();
|
||||
@ -317,6 +320,7 @@ class Monitor extends BeanModel {
|
||||
|
||||
stop() {
|
||||
clearTimeout(this.heartbeatInterval);
|
||||
this.isStop = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user