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
+1 -1
View File
@@ -71,7 +71,7 @@ func writeAnnounceResponse(w http.ResponseWriter, resp *chihaya.AnnounceResponse
func writeScrapeResponse(w http.ResponseWriter, resp *chihaya.ScrapeResponse) error {
filesDict := bencode.NewDict()
for infohash, scrape := range resp.Files {
filesDict[infohash] = bencode.Dict{
filesDict[string(infohash)] = bencode.Dict{
"complete": scrape.Complete,
"incomplete": scrape.Incomplete,
}