From d6361d0a40286d849374176cd85cecd87372cbe5 Mon Sep 17 00:00:00 2001 From: Manuel Sabban Date: Tue, 8 Aug 2023 17:12:50 +0200 Subject: [PATCH] conditional overflow doesn't overflow on capacity (#2412) * conditional overflow doesn't overflow on capacity * typo --- pkg/leakybucket/timemachine.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/leakybucket/timemachine.go b/pkg/leakybucket/timemachine.go index 6e84797d4..266a8be7c 100644 --- a/pkg/leakybucket/timemachine.go +++ b/pkg/leakybucket/timemachine.go @@ -35,7 +35,7 @@ func TimeMachinePour(l *Leaky, msg types.Event) { } l.Last_ts = d l.mutex.Unlock() - if l.Limiter.AllowN(d, 1) { + if l.Limiter.AllowN(d, 1) || l.conditionalOverflow { l.logger.Tracef("Time-Pouring event %s (tokens:%f)", d, l.Limiter.GetTokensCount()) l.Queue.Add(msg) } else {