Merge pull request #1762 from kaysond/master

Fix upside down push monitors
pull/1767/head
Louis Lam 2 years ago committed by GitHub
commit 9b21b86e70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -406,7 +406,7 @@ class Monitor extends BeanModel {
// If the previous beat was down or pending we use the regular // If the previous beat was down or pending we use the regular
// beatInterval/retryInterval in the setTimeout further below // 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"); throw new Error("No heartbeat in the time window");
} else { } else {
let timeout = beatInterval * 1000 - msSinceLastBeat; let timeout = beatInterval * 1000 - msSinceLastBeat;

Loading…
Cancel
Save