From 242892eb79f747e6aeff3025ed6ac1e4a474be5d Mon Sep 17 00:00:00 2001 From: Justin Li Date: Wed, 16 Jul 2014 20:08:23 -0400 Subject: [PATCH] Use <= over < for time comparison to allow for sub-second tests --- drivers/tracker/memory/conn.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tracker/memory/conn.go b/drivers/tracker/memory/conn.go index 957164c..e589ec0 100644 --- a/drivers/tracker/memory/conn.go +++ b/drivers/tracker/memory/conn.go @@ -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) } }