From e6378daadf1bba7833868b0501f2f0fc12d9b9cd Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 29 Oct 2019 16:25:13 +0000 Subject: [PATCH] fshttp: don't print token bucket errors on context cancelled These happen as a natural part of exceeding --max-transfer and we don't need to worry the user with them. --- fs/fshttp/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fshttp/http.go b/fs/fshttp/http.go index cb4e219ac..db1face8b 100644 --- a/fs/fshttp/http.go +++ b/fs/fshttp/http.go @@ -318,7 +318,7 @@ func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error // Get transactions per second token first if limiting if tpsBucket != nil { tbErr := tpsBucket.Wait(req.Context()) - if tbErr != nil { + if tbErr != nil && tbErr != context.Canceled { fs.Errorf(nil, "HTTP token bucket error: %v", tbErr) } }