From eb5fd3127f3d557cc9771756c400baf4d12d2b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sun, 29 Oct 2023 10:57:25 +0100 Subject: [PATCH] Revert "modules: Adjust the log throttle logic a little" This reverts commit 3f64b5a3de5f097c4ee1b70505398f75feb391c4. --- modules/client.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/client.go b/modules/client.go index 9a0415632..b3dad498b 100644 --- a/modules/client.go +++ b/modules/client.go @@ -106,18 +106,16 @@ func NewClient(cfg ClientConfig) *Client { var throttleSince time.Time throttle := func(f func()) { - // Skip the first call. - // This is used for "download" etc. and we want to avoid - // logging anything if it is fast. if throttleSince.IsZero() { throttleSince = time.Now() + f() return } if time.Since(throttleSince) < 6*time.Second { return } - f() throttleSince = time.Now() + f() } return &Client{