global.go | 2 -- torrent.go | 2 +- diff --git a/global.go b/global.go index b9950cb2ef6d23b35ba627d40d9f1e0c12736365..63ac303f5d0857496979429f4caa9d27c0398fcf 100644 --- a/global.go +++ b/global.go @@ -29,8 +29,6 @@ // may be attached to a Client someday. 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 69a0c667f08fbf113fd11d8c9d6f52e840ab63f7..33ade6dbaff48262d02d3836d9cbe220d6939aad 100644 --- a/torrent.go +++ b/torrent.go @@ -255,7 +255,7 @@ } 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 }