mirror of https://github.com/zlatinb/muwire
fixes
parent
98dd80c4b8
commit
2f3d23bc34
|
@ -38,6 +38,7 @@ class UpdateClient {
|
||||||
private long lastUpdateCheckTime
|
private long lastUpdateCheckTime
|
||||||
|
|
||||||
private volatile InfoHash updateInfoHash
|
private volatile InfoHash updateInfoHash
|
||||||
|
private volatile String version, signer
|
||||||
private volatile boolean updateDownloading
|
private volatile boolean updateDownloading
|
||||||
|
|
||||||
UpdateClient(EventBus eventBus, I2PSession session, String myVersion, MuWireSettings settings, FileManager fileManager, Persona me) {
|
UpdateClient(EventBus eventBus, I2PSession session, String myVersion, MuWireSettings settings, FileManager fileManager, Persona me) {
|
||||||
|
@ -74,7 +75,7 @@ class UpdateClient {
|
||||||
if (e.downloadedFile.infoHash != updateInfoHash)
|
if (e.downloadedFile.infoHash != updateInfoHash)
|
||||||
return
|
return
|
||||||
updateDownloading = false
|
updateDownloading = false
|
||||||
eventBus.publish(new UpdateDownloadedEvent(version : payload.version, signer : payload.signer))
|
eventBus.publish(new UpdateDownloadedEvent(version : version, signer : signer))
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkUpdate() {
|
private void checkUpdate() {
|
||||||
|
@ -150,6 +151,8 @@ class UpdateClient {
|
||||||
eventBus.publish(new UpdateDownloadedEvent(version : payload.version, signer : payload.signer))
|
eventBus.publish(new UpdateDownloadedEvent(version : payload.version, signer : payload.signer))
|
||||||
else {
|
else {
|
||||||
updateDownloading = false
|
updateDownloading = false
|
||||||
|
version = payload.version
|
||||||
|
signer = payload.signer
|
||||||
log.info("starting search for new version hash $payload.infoHash")
|
log.info("starting search for new version hash $payload.infoHash")
|
||||||
def searchEvent = new SearchEvent(searchHash : updateInfoHash.getRoot(), uuid : UUID.randomUUID(), oobInfohash : true)
|
def searchEvent = new SearchEvent(searchHash : updateInfoHash.getRoot(), uuid : UUID.randomUUID(), oobInfohash : true)
|
||||||
def queryEvent = new QueryEvent(searchEvent : searchEvent, firstHop : true, replyTo : me.destination,
|
def queryEvent = new QueryEvent(searchEvent : searchEvent, firstHop : true, replyTo : me.destination,
|
||||||
|
|
Loading…
Reference in New Issue