mirror of
https://github.com/sot-tech/mochi.git
synced 2026-07-25 09:08:09 -07:00
Allow purge interval to be set, and fix variable naming
This commit is contained in:
@@ -208,12 +208,12 @@ func (c *Conn) DeleteClient(peerID string) error {
|
||||
}
|
||||
|
||||
func (c *Conn) PurgeInactiveTorrents(before time.Time) error {
|
||||
unix := before.Unix()
|
||||
unixtime := before.Unix()
|
||||
var queue []string
|
||||
|
||||
c.torrentsM.RLock()
|
||||
for key, torrent := range c.torrents {
|
||||
if torrent.LastAction < unix {
|
||||
if torrent.LastAction < unixtime {
|
||||
queue = append(queue, key)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user