projects
/
btrtrc.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42d29d9
)
Don't log using torrent source as warning for context cancellation
v1.50.0
author
Matt Joiner <anacrolix@gmail.com>
Tue, 4 Apr 2023 09:13:14 +0000 (19:13 +1000)
committer
Matt Joiner <anacrolix@gmail.com>
Tue, 4 Apr 2023 09:13:14 +0000 (19:13 +1000)
This probably occurs because the info was obtained and we don't need to try the source anymore.
sources.go
patch
|
blob
|
history
diff --git
a/sources.go
b/sources.go
index 3923e8e6aa4f0149bc4365ad1feb948f6912190c..ed5ecbfa6c0b492884aaa60e55b222ce9d5ecf7d 100644
(file)
--- a/
sources.go
+++ b/
sources.go
@@
-2,6
+2,7
@@
package torrent
import (
"context"
+ "errors"
"fmt"
"net/http"
@@
-34,7
+35,7
@@
func (t *Torrent) UseSources(sources []string) {
panic(s)
}
level := log.Debug
- if err != nil {
+ if err != nil
&& !errors.Is(err, context.Canceled)
{
level = log.Warning
}
t.logger.Levelf(level, "used torrent source %q [err=%v]", s, err)