From dc154437164f6ec1b89b8e9f60e1cecc64709a28 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Sun, 23 Jun 2024 23:46:52 +0800 Subject: [PATCH] Revert "Fix: Use `retryInterval` when a monitor is `DOWN`" (#4875) --- server/model/monitor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index b3ed31d6c..1b11c614e 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -897,6 +897,7 @@ class Monitor extends BeanModel { retries = 0; } catch (error) { + if (error?.name === "CanceledError") { bean.msg = `timeout by AbortSignal (${this.timeout}s)`; } else { @@ -969,7 +970,6 @@ class Monitor extends BeanModel { } else if (bean.status === MAINTENANCE) { log.warn("monitor", `Monitor #${this.id} '${this.name}': Under Maintenance | Type: ${this.type}`); } else { - beatInterval = this.retryInterval; log.warn("monitor", `Monitor #${this.id} '${this.name}': Failing: ${bean.msg} | Interval: ${beatInterval} seconds | Type: ${this.type} | Down Count: ${bean.downCount} | Resend Interval: ${this.resendInterval}`); }