Revert "modules: Adjust the log throttle logic a little" - hugo - [fork] hugo port for 9front
 (HTM) git clone git@git.drkhsh.at/hugo.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit eb5fd3127f3d557cc9771756c400baf4d12d2b4e
 (DIR) parent 3ed28e4bfe2d333fdf1ca2434b57cfc10c3d9791
 (HTM) Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
       Date:   Sun, 29 Oct 2023 10:57:25 +0100
       
       Revert "modules: Adjust the log throttle logic a little"
       
       This reverts commit 3f64b5a3de5f097c4ee1b70505398f75feb391c4.
       
       Diffstat:
         M modules/client.go                   |       6 ++----
       
       1 file changed, 2 insertions(+), 4 deletions(-)
       ---
 (DIR) diff --git 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{