X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=sources.go;h=ed5ecbfa6c0b492884aaa60e55b222ce9d5ecf7d;hb=HEAD;hp=a03b767506a568940e5c2c3d0576d2f92e80dd75;hpb=e801f8518f5992585c372a997f647441695089f4;p=btrtrc.git diff --git a/sources.go b/sources.go index a03b7675..ed5ecbfa 100644 --- a/sources.go +++ b/sources.go @@ -2,10 +2,12 @@ package torrent import ( "context" + "errors" "fmt" "net/http" "github.com/anacrolix/log" + "github.com/anacrolix/torrent/bencode" "github.com/anacrolix/torrent/metainfo" ) @@ -33,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)