summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/client.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/client.go b/modules/client.go
index b3dad498b..9a0415632 100644
--- a/modules/client.go
+++ b/modules/client.go
@@ -106,16 +106,18 @@ 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
}
- throttleSince = time.Now()
f()
+ throttleSince = time.Now()
}
return &Client{