Don’t block the USK callback thread.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 8 Nov 2010 18:42:19 +0000 (19:42 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 8 Nov 2010 18:42:19 +0000 (19:42 +0100)
src/main/java/net/pterodactylus/sone/core/FreenetInterface.java

index 83a3253..f5d7b66 100644 (file)
@@ -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();
                                        }
                                }