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

pull/53/head
Zlatin Balevsky 2020-04-28 19:18:37 +01:00
parent acee9a5805
commit c306864781
1 changed files with 2 additions and 0 deletions

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)