mirror of
https://github.com/sot-tech/mochi.git
synced 2026-07-19 14:48:09 -07:00
replace time.NewTicker().C with time.After
They are synonymous and time.After is much easier to read.
This commit is contained in:
+1
-1
@@ -96,7 +96,7 @@ func (tkr *Tracker) purgeInactivePeers(purgeEmptyTorrents bool, threshold, inter
|
||||
case <-tkr.shuttingDown:
|
||||
return
|
||||
|
||||
case <-time.NewTicker(interval).C:
|
||||
case <-time.After(interval):
|
||||
before := time.Now().Add(-threshold)
|
||||
glog.V(0).Infof("Purging peers with no announces since %s", before)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user