mirror of
https://github.com/sot-tech/mochi.git
synced 2026-05-11 14:41:16 -07:00
Purge peers that have not announced for twice the announce interval
This commit is contained in:
@@ -99,6 +99,13 @@ func Serve(cfg *config.Config) {
|
||||
glog.Fatal("New: ", err)
|
||||
}
|
||||
|
||||
go tracker.PurgeInactivePeers(
|
||||
t.pool,
|
||||
cfg.PurgeInactiveTorrents,
|
||||
cfg.Announce.Duration*2,
|
||||
cfg.Announce.Duration,
|
||||
)
|
||||
|
||||
glog.V(0).Info("Starting on ", cfg.Addr)
|
||||
graceful.Run(cfg.Addr, cfg.RequestTimeout.Duration, NewRouter(t, cfg))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user