]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Include count of peer conns in status
authorMatt Joiner <anacrolix@gmail.com>
Wed, 3 May 2023 06:40:51 +0000 (16:40 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Tue, 9 May 2023 05:46:53 +0000 (15:46 +1000)
torrent.go

index c5af556def2a2248503a03c7450b4d9f3c937a84..5d78f3902514d06222959e5ba8dd0f60a4e11449 100644 (file)
@@ -785,7 +785,7 @@ func (t *Torrent) writeStatus(w io.Writer) {
                return ml.Less()
        })
 
-       fmt.Fprintf(w, "peer conns:\n")
+       fmt.Fprintf(w, "%v peer conns:\n", len(peerConns))
        t.writePeerStatuses(w, g.SliceMap(peerConns, func(pc *PeerConn) *Peer {
                return &pc.Peer
        }))