Introduce thread-safe PeerMap

This commit is contained in:
Jimmy Zelinskie
2014-08-04 06:15:08 -04:00
parent d610b4ebb0
commit 3cb286fb40
5 changed files with 180 additions and 138 deletions

View File

@@ -111,8 +111,8 @@ func filesDict(torrents []*models.Torrent) bencode.Dict {
func torrentDict(torrent *models.Torrent) bencode.Dict {
return bencode.Dict{
"complete": len(torrent.Seeders),
"incomplete": len(torrent.Leechers),
"complete": torrent.Seeders.Len(),
"incomplete": torrent.Leechers.Len(),
"downloaded": torrent.Snatches,
}
}