mirror of
https://github.com/sot-tech/mochi.git
synced 2026-05-02 18:39:59 -07:00
Support dual-stacked peers
This commit is contained in:
@@ -270,14 +270,14 @@ func (c *Conn) PurgeInactivePeers(purgeEmptyTorrents bool, before time.Time) err
|
||||
for key, peer := range torrent.Seeders {
|
||||
if peer.LastAnnounce <= unixtime {
|
||||
delete(torrent.Seeders, key)
|
||||
stats.RecordPeerEvent(stats.ReapedSeed, peer.IPv6())
|
||||
stats.RecordPeerEvent(stats.ReapedSeed, peer.HasIPv6())
|
||||
}
|
||||
}
|
||||
|
||||
for key, peer := range torrent.Leechers {
|
||||
if peer.LastAnnounce <= unixtime {
|
||||
delete(torrent.Leechers, key)
|
||||
stats.RecordPeerEvent(stats.ReapedLeech, peer.IPv6())
|
||||
stats.RecordPeerEvent(stats.ReapedLeech, peer.HasIPv6())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user