udoprog / leaky-bucket

A token-based rate limiter based on the leaky bucket algorithm.
Apache License 2.0
92 stars 10 forks source link

Gracefully terminate if new task queue ends (relates #5) #7

Closed udoprog closed 4 years ago

udoprog commented 4 years ago

Fixes a panic that can happen in in case we're using an explicit coordinator and the LeakyBuckets instance is dropped, as documented here: https://github.com/udoprog/leaky-bucket/issues/5#issuecomment-703205787