From 2f3d23bc34714090aa2adef51adf9b02fba059be Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Sat, 29 Jun 2019 10:12:50 +0100 Subject: [PATCH] fixes --- .../main/groovy/com/muwire/core/update/UpdateClient.groovy | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/groovy/com/muwire/core/update/UpdateClient.groovy b/core/src/main/groovy/com/muwire/core/update/UpdateClient.groovy index a9de2d66..41605177 100644 --- a/core/src/main/groovy/com/muwire/core/update/UpdateClient.groovy +++ b/core/src/main/groovy/com/muwire/core/update/UpdateClient.groovy @@ -38,6 +38,7 @@ class UpdateClient { private long lastUpdateCheckTime private volatile InfoHash updateInfoHash + private volatile String version, signer private volatile boolean updateDownloading UpdateClient(EventBus eventBus, I2PSession session, String myVersion, MuWireSettings settings, FileManager fileManager, Persona me) { @@ -74,7 +75,7 @@ class UpdateClient { if (e.downloadedFile.infoHash != updateInfoHash) return updateDownloading = false - eventBus.publish(new UpdateDownloadedEvent(version : payload.version, signer : payload.signer)) + eventBus.publish(new UpdateDownloadedEvent(version : version, signer : signer)) } private void checkUpdate() { @@ -150,6 +151,8 @@ class UpdateClient { eventBus.publish(new UpdateDownloadedEvent(version : payload.version, signer : payload.signer)) else { updateDownloading = false + version = payload.version + signer = payload.signer log.info("starting search for new version hash $payload.infoHash") def searchEvent = new SearchEvent(searchHash : updateInfoHash.getRoot(), uuid : UUID.randomUUID(), oobInfohash : true) def queryEvent = new QueryEvent(searchEvent : searchEvent, firstHop : true, replyTo : me.destination,