mirror of
https://github.com/LBRYFoundation/tracker.git
synced 2025-08-23 17:47:29 +00:00
Use <= over < for time comparison to allow for sub-second tests
This commit is contained in:
parent
a2e14f79c2
commit
242892eb79
1 changed files with 2 additions and 2 deletions
|
@ -251,13 +251,13 @@ func (c *Conn) PurgeInactivePeers(purgeEmptyTorrents bool, before time.Time) err
|
||||||
}
|
}
|
||||||
|
|
||||||
for key, peer := range torrent.Seeders {
|
for key, peer := range torrent.Seeders {
|
||||||
if peer.LastAnnounce < unixtime {
|
if peer.LastAnnounce <= unixtime {
|
||||||
delete(torrent.Seeders, key)
|
delete(torrent.Seeders, key)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for key, peer := range torrent.Leechers {
|
for key, peer := range torrent.Leechers {
|
||||||
if peer.LastAnnounce < unixtime {
|
if peer.LastAnnounce <= unixtime {
|
||||||
delete(torrent.Leechers, key)
|
delete(torrent.Leechers, key)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue