mirror of
https://github.com/sot-tech/mochi.git
synced 2026-07-26 01:18:10 -07:00
Only prune torrents if they have no peers
This commit is contained in:
@@ -213,7 +213,7 @@ func (c *Conn) PurgeInactiveTorrents(before time.Time) error {
|
||||
|
||||
c.torrentsM.RLock()
|
||||
for key, torrent := range c.torrents {
|
||||
if torrent.LastAction < unixtime {
|
||||
if torrent.LastAction < unixtime && torrent.PeerCount() == 0 {
|
||||
queue = append(queue, key)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user