Skip to content

Commit e436730

Browse files
committed
fix: rate limit count
1 parent c79df94 commit e436730

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

service/aiproxy/common/rpmlimit/rate-limit.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ redis.call('ZREMRANGEBYSCORE', over_limit_key, '-inf', cutoff)
3232
local count = redis.call('ZCOUNT', key, cutoff, current_time)
3333
local over_limit_count = redis.call('ZCOUNT', over_limit_key, cutoff, current_time)
3434
35-
if count < max_requests then
35+
if count <= max_requests then
3636
redis.call('ZADD', key, current_time, current_time)
3737
redis.call('PEXPIRE', key, window / 1000)
3838
count = count + 1

0 commit comments

Comments
 (0)