Merge pull request #188 from mrd0ll4r/response-smallfix
response: add announce interval
This commit is contained in:
commit
1e5d42ff6b
1 changed files with 1 additions and 0 deletions
|
@ -28,6 +28,7 @@ func responseAnnounceClient(next tracker.AnnounceHandler) tracker.AnnounceHandle
|
||||||
return func(cfg *chihaya.TrackerConfig, req *chihaya.AnnounceRequest, resp *chihaya.AnnounceResponse) (err error) {
|
return func(cfg *chihaya.TrackerConfig, req *chihaya.AnnounceRequest, resp *chihaya.AnnounceResponse) (err error) {
|
||||||
storage := store.MustGetStore()
|
storage := store.MustGetStore()
|
||||||
|
|
||||||
|
resp.Interval = cfg.AnnounceInterval
|
||||||
resp.MinInterval = cfg.MinAnnounceInterval
|
resp.MinInterval = cfg.MinAnnounceInterval
|
||||||
resp.Compact = req.Compact
|
resp.Compact = req.Compact
|
||||||
resp.Complete = int32(storage.NumSeeders(req.InfoHash))
|
resp.Complete = int32(storage.NumSeeders(req.InfoHash))
|
||||||
|
|
Loading…
Reference in a new issue