mirror of
https://github.com/NotAShelf/watchdog.git
synced 2026-03-07 05:46:00 +00:00
The TokenBucket ratelimiter accumulated time drift over multiple refills because I'm an idiot. We were using 'now' as base for lastFill calc. but this could case rate limiting to become inaccurate over time. Now we advance lastFill by *exact* periods from previous value. Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ia3990b441ab6072f51dfdfa4a2511b5f6a6a6964 |
||
|---|---|---|
| .. | ||
| limiter.go | ||
| limiter_test.go | ||