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 {
|
||||
if peer.LastAnnounce < unixtime {
|
||||
if peer.LastAnnounce <= unixtime {
|
||||
delete(torrent.Seeders, key)
|
||||
}
|
||||
}
|
||||
|
||||
for key, peer := range torrent.Leechers {
|
||||
if peer.LastAnnounce < unixtime {
|
||||
if peer.LastAnnounce <= unixtime {
|
||||
delete(torrent.Leechers, key)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue