hotfix: initialized scrape map

This commit is contained in:
Leo Balduf
2016-04-02 20:22:15 -04:00
parent cd979c61c9
commit 9c1168746a
5 changed files with 9 additions and 6 deletions
+3 -1
View File
@@ -75,7 +75,9 @@ func (t *Tracker) HandleAnnounce(req *chihaya.AnnounceRequest) (*chihaya.Announc
// HandleScrape runs a ScrapeRequest through the Tracker's middleware and
// returns the result.
func (t *Tracker) HandleScrape(req *chihaya.ScrapeRequest) (*chihaya.ScrapeResponse, error) {
resp := &chihaya.ScrapeResponse{}
resp := &chihaya.ScrapeResponse{
Files: make(map[chihaya.InfoHash]chihaya.Scrape),
}
err := t.handleScrape(t.cfg, req, resp)
return resp, err
}