mirror of https://github.com/zlatinb/muwire
guard mesh.json as well
parent
6d587bf228
commit
8df6715e24
|
@ -82,6 +82,9 @@ class MeshManager {
|
|||
JsonSlurper slurper = new JsonSlurper()
|
||||
meshFile.eachLine {
|
||||
def json = slurper.parseText(it)
|
||||
if (json.nPieces == null || json.nPieces == 0)
|
||||
return // skip it, invalid
|
||||
|
||||
if (now - json.timestamp > settings.meshExpiration * 60 * 1000)
|
||||
return
|
||||
InfoHash infoHash = new InfoHash(Base64.decode(json.infoHash))
|
||||
|
|
Loading…
Reference in New Issue