From b654eb3643a6bcd7dc9c7f089e657be74aebd8a5 Mon Sep 17 00:00:00 2001 From: alikia2x Date: Sun, 23 Mar 2025 20:30:06 +0800 Subject: [PATCH] fix: potential NaN as delay time when scheduling --- lib/mq/exec/snapshotTick.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/mq/exec/snapshotTick.ts b/lib/mq/exec/snapshotTick.ts index 95457e0..0919164 100644 --- a/lib/mq/exec/snapshotTick.ts +++ b/lib/mq/exec/snapshotTick.ts @@ -97,6 +97,11 @@ const getAdjustedShortTermETA = async (client: Client, aid: number) => { minETAHours = adjustedETA; } } + + if (isNaN(minETAHours)) { + minETAHours = Infinity; + } + return minETAHours; };