diff --git a/global.go b/global.go index b9950cb2..63ac303f 100644 --- a/global.go +++ b/global.go @@ -29,8 +29,6 @@ func defaultPeerExtensionBytes() PeerExtensionBits { var ( torrent = expvar.NewMap("torrent") - peersAddedBySource = expvar.NewMap("peersAddedBySource") - pieceHashedCorrect = expvar.NewInt("pieceHashedCorrect") pieceHashedNotCorrect = expvar.NewInt("pieceHashedNotCorrect") diff --git a/torrent.go b/torrent.go index 69a0c667..33ade6db 100644 --- a/torrent.go +++ b/torrent.go @@ -255,7 +255,7 @@ func (t *Torrent) unclosedConnsAsSlice() (ret []*PeerConn) { func (t *Torrent) addPeer(p Peer) { cl := t.cl - peersAddedBySource.Add(string(p.Source), 1) + torrent.Add(fmt.Sprintf("peers added by source %q", p.Source), 1) if t.closed.IsSet() { return }