From: Bjørn Erik Pedersen Date: Sun, 29 Oct 2023 09:57:25 +0000 (+0100) Subject: Revert "modules: Adjust the log throttle logic a little" X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=eb5fd3127f3d557cc9771756c400baf4d12d2b4e;p=brevno-suite%2Fhugo Revert "modules: Adjust the log throttle logic a little" This reverts commit 3f64b5a3de5f097c4ee1b70505398f75feb391c4. --- 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{