-
- Downloads
rate limiter: Fix a race condition
When multiple requests are processed by rate limiter plug at the same time and the bucket is not yet initialized, both would try to initialize the bucket resulting in an internal server error.
Showing
- lib/pleroma/plugs/rate_limiter/limiter_supervisor.ex 8 additions, 2 deletionslib/pleroma/plugs/rate_limiter/limiter_supervisor.ex
- lib/pleroma/plugs/rate_limiter/rate_limiter.ex 10 additions, 5 deletionslib/pleroma/plugs/rate_limiter/rate_limiter.ex
- test/plugs/rate_limiter_test.exs 31 additions, 0 deletionstest/plugs/rate_limiter_test.exs
Please register or sign in to comment