torrent.go | 2 ++ diff --git a/torrent.go b/torrent.go index 2d0cce2e13f210cb8edddd8dbb80ab0f88ec5262..0b1baba53c580840ff5b7a0a7c17ef1bd07bc43f 100644 --- a/torrent.go +++ b/torrent.go @@ -245,6 +245,8 @@ } } // Add active peers to the list + t.cl.rLock() + defer t.cl.rUnlock() for conn := range t.conns { ks = append(ks, PeerInfo{ Id: conn.PeerID,