Skip to content

Conversation

@mic1on
Copy link

@mic1on mic1on commented Mar 19, 2024

The RateLimiter class was designed to allow time constraints to be null and default to 0. It can be assumed that if the user does not pass any time constraints, there are no limits.

However, when 0 is passed into the Redis script:
redis.call("SET", key, 1, "px", "0")

It triggers an exception:

redis.exceptions.ResponseError: invalid expire time in 'set' command script

Hence, this PR is proposed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants