Use <= over < for time comparison to allow for sub-second tests

This commit is contained in:
Justin Li 2014-07-16 20:08:23 -04:00
parent a2e14f79c2
commit 242892eb79

View file

@ -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)
}
}