diff --git a/server/model/monitor.js b/server/model/monitor.js index 19f21d92..cc9ab454 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -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; } /**