Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting up a memory limiter with fewer points then .set(), results in negative remaining value #172

Closed
maximehuylebroeck opened this issue Jul 28, 2022 · 2 comments

Comments

@maximehuylebroeck
Copy link
Contributor

Hey,

Was trying to add the memory limiter (and pg,mysql and redis limiter) to a project.
But when writing my tests I saw a small discrepancy between the result of the memory limiter and the other ones.
When you create a new memory limiter with let's say 5 points, And we use the .set() api to set a key to 10 points.
When getting the response of a .get() it shows the "remaining" as -5 while for the other limiters (mentioned above) it results in 0.

Thanks In Advance

@maximehuylebroeck
Copy link
Contributor Author

Created a pr for this

animir added a commit that referenced this issue Jul 29, 2022
…ing-response-value

fix for negative remaining values
@animir
Copy link
Owner

animir commented Jul 29, 2022

@MiniKraken-Team 👍 Published to npm in version 2.3.8.

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

No branches or pull requests

2 participants