Merge pull request #188 from mrd0ll4r/response-smallfix

response: add announce interval
This commit is contained in:
Jimmy Zelinskie 2016-07-13 13:30:53 -04:00 committed by GitHub
commit 1e5d42ff6b

View file

@ -28,6 +28,7 @@ func responseAnnounceClient(next tracker.AnnounceHandler) tracker.AnnounceHandle
return func(cfg *chihaya.TrackerConfig, req *chihaya.AnnounceRequest, resp *chihaya.AnnounceResponse) (err error) {
storage := store.MustGetStore()
resp.Interval = cfg.AnnounceInterval
resp.MinInterval = cfg.MinAnnounceInterval
resp.Compact = req.Compact
resp.Complete = int32(storage.NumSeeders(req.InfoHash))