This commit is contained in:
Mrx
2026-05-07 12:39:37 +08:00
parent 1ca6e1c81d
commit dfd7e86f6c
2 changed files with 3 additions and 2 deletions

View File

@@ -251,7 +251,7 @@ func (m *DailyRateLimitMiddleware) shouldRecordNearLimit(current, max int) bool
if max <= 0 {
return false
}
threshold := int(math.Ceil(float64(max) * 0.8))
threshold := int(math.Ceil(float64(max) * 0.9))
if threshold < 1 {
threshold = 1
}