diff --git a/crates/throttle/src/throttle.rs b/crates/throttle/src/throttle.rs index eab53631..25e9da7c 100644 --- a/crates/throttle/src/throttle.rs +++ b/crates/throttle/src/throttle.rs @@ -60,7 +60,7 @@ else throttled = 0 reset_after = math.ceil(new_tat - now) retry_after = 0 - redis.call("SET", key, new_tat, "PX", reset_after) + redis.call("SET", key, new_tat, "EX", reset_after) end return {throttled, remaining, reset_after, retry_after, tostring(diff), tostring(interval)} diff --git a/docs/changelog/main.md b/docs/changelog/main.md index b2f13995..5b451427 100644 --- a/docs/changelog/main.md +++ b/docs/changelog/main.md @@ -112,3 +112,5 @@ * Rebuilding a MIME message (such as via `msg:check_fix_conformance`) that had binary attachments would incorrectly re-interpret the bytes as windows-1252 encoded characters, damaging the attachment. +* Using redis-based throttles without redis-cell and with long periods (eg: `500/d`) + could result in throttles being exceeded.