add type to the tracker pong and echo the infohash that was queried

This commit is contained in:
Zlatin Balevsky
2020-04-28 19:18:37 +01:00
parent acee9a5805
commit c306864781

View File

@@ -108,6 +108,7 @@ class TrackerResponder {
}
def response = [:]
response.type = "TrackerPong"
response.me = me.toBase64()
if (!muSettings.allowTracking) {
@@ -128,6 +129,7 @@ class TrackerResponder {
log.warning("infoHash missing")
return
}
response.infoHash = json.infoHash
byte[] infoHashBytes = Base64.decode(json.infoHash)
InfoHash infoHash = new InfoHash(infoHashBytes)