]> Sergey Matveev's repositories - btrtrc.git/commitdiff
connection drop log debug level
authorucwong <ucwong@126.com>
Wed, 6 Jan 2021 09:27:17 +0000 (17:27 +0800)
committerMatt Joiner <anacrolix@gmail.com>
Wed, 6 Jan 2021 13:21:59 +0000 (00:21 +1100)
cmd/torrent-metainfo-pprint/main.go
torrent.go

index c6ab27ec88eb1468e20ac324e24a2e1dc745c751..16f2b3039fe37df28f41b208bba57dfafd914697 100644 (file)
@@ -47,7 +47,7 @@ func processReader(r io.Reader) error {
                "AnnounceList": metainfo.AnnounceList,
                "UrlList":      metainfo.UrlList,
        }
-       if len(metainfo.Nodes) >  0 {
+       if len(metainfo.Nodes) > 0 {
                d["Nodes"] = metainfo.Nodes
        }
        if flags.Files {
index ffb452d4c6a50b553f165b7852e2e63c8897dc04..462dad1ed0aca936f9d7d8b0ec6ae49a99110205 100644 (file)
@@ -842,7 +842,7 @@ func (t *Torrent) maybeDropMutuallyCompletePeer(
        if p.useful() {
                return
        }
-       log.Printf("dropping %v, which is mutually complete", p)
+       t.logger.WithDefaultLevel(log.Debug).Printf("dropping %v, which is mutually complete", p)
        p.drop()
 }