From: David ‘Bombe’ Roden Date: Mon, 8 Nov 2010 18:42:19 +0000 (+0100) Subject: Don’t block the USK callback thread. X-Git-Tag: 0.2-RC2~1 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=b053038ea1d3479eb382ac87f467ce9efd5be0de Don’t block the USK callback thread. --- diff --git a/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java b/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java index 83a3253..f5d7b66 100644 --- a/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java +++ b/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java @@ -153,7 +153,13 @@ public class FreenetInterface { logger.log(Level.FINE, "Found USK update for Sone “%s” at %s, new known good: %s, new slot too: %s.", new Object[] { sone, key, newKnownGood, newSlotToo }); if (newKnownGood) { sone.setLatestEdition(key.suggestedEdition); - soneDownloader.fetchSone(sone); + new Thread(new Runnable() { + + @Override + public void run() { + soneDownloader.fetchSone(sone); + } + }, "Sone Downloader").start(); } }