diff --git a/server/model/monitor.js b/server/model/monitor.js index eb8f6900..7c269fe2 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -406,7 +406,7 @@ class Monitor extends BeanModel { // If the previous beat was down or pending we use the regular // beatInterval/retryInterval in the setTimeout further below - if (previousBeat.status !== UP || msSinceLastBeat > beatInterval * 1000 + bufferTime) { + if (previousBeat.status !== (this.isUpsideDown() ? DOWN : UP) || msSinceLastBeat > beatInterval * 1000 + bufferTime) { throw new Error("No heartbeat in the time window"); } else { let timeout = beatInterval * 1000 - msSinceLastBeat;