mirror of https://github.com/zlatinb/muwire
sync persisting of hashlist or hashroot for active downloads
parent
658d9cf5a8
commit
ca3f2513e1
|
@ -124,10 +124,11 @@ public class DownloadManager {
|
|||
}
|
||||
json.destinations = destinations
|
||||
|
||||
if (downloader.infoHash.hashList != null)
|
||||
json.hashList = Base64.encode(downloader.infoHash.hashList)
|
||||
InfoHash infoHash = downloader.getInfoHash()
|
||||
if (infoHash.hashList != null)
|
||||
json.hashList = Base64.encode(infoHash.hashList)
|
||||
else
|
||||
json.hashRoot = Base64.encode(downloader.infoHash.getRoot())
|
||||
json.hashRoot = Base64.encode(infoHash.getRoot())
|
||||
writer.println(JsonOutput.toJson(json))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ public class Downloader {
|
|||
claimed = new Pieces(nPieces)
|
||||
}
|
||||
|
||||
private synchronized InfoHash getInfoHash() {
|
||||
public synchronized InfoHash getInfoHash() {
|
||||
infoHash
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue