Use fetch action instead of custom Runnable.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 12 Sep 2014 19:53:35 +0000 (21:53 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 12 Sep 2014 19:53:35 +0000 (21:53 +0200)
src/main/java/net/pterodactylus/sone/core/FreenetInterface.java

index d4640f8..5dd8fbf 100644 (file)
@@ -202,13 +202,7 @@ public class FreenetInterface {
                                        logger.log(Level.FINE, String.format("Found USK update for Sone “%s” at %s, new known good: %s, new slot too: %s.", sone, key, newKnownGood, newSlotToo));
                                        if (edition > sone.getLatestEdition()) {
                                                sone.setLatestEdition(edition);
-                                               new Thread(new Runnable() {
-
-                                                       @Override
-                                                       public void run() {
-                                                               soneDownloader.fetchSone(sone);
-                                                       }
-                                               }, "Sone Downloader").start();
+                                               new Thread(soneDownloader.fetchSoneAction(sone), "Sone Downloader").start();
                                        }
                                }