fix service (#1015)

This commit is contained in:
UUBulb
2025-03-02 16:36:57 +08:00
committed by GitHub
parent 4844b1d8a3
commit 831ddf1136
2 changed files with 6 additions and 4 deletions

View File

@@ -97,7 +97,7 @@ func (r *AlertRule) Check(points [][]bool) (int, bool) {
if hasPassedRule = boundCheck(len(points), duration, hasPassedRule); hasPassedRule {
continue
}
for timeTick := len(points); timeTick >= len(points)-duration; timeTick-- {
for timeTick := len(points); timeTick > len(points)-duration; timeTick-- {
fail++
if points[timeTick][ruleIndex] {
hasPassedRule = true