mirror of
https://github.com/sot-tech/mochi.git
synced 2026-05-13 07:48:35 -07:00
Fix Purge reporting all peers as Seeders
PeerMaps now are constructed with a boolean value that tells the map whether they are hosting seeders or leechers.
This commit is contained in:
@@ -37,8 +37,8 @@ func (tkr *Tracker) HandleAnnounce(ann *models.Announce, w Writer) error {
|
||||
if err == models.ErrTorrentDNE && !tkr.cfg.PrivateEnabled {
|
||||
torrent = &models.Torrent{
|
||||
Infohash: ann.Infohash,
|
||||
Seeders: models.NewPeerMap(),
|
||||
Leechers: models.NewPeerMap(),
|
||||
Seeders: models.NewPeerMap(true),
|
||||
Leechers: models.NewPeerMap(false),
|
||||
}
|
||||
|
||||
err = conn.PutTorrent(torrent)
|
||||
|
||||
Reference in New Issue
Block a user