Create our own realtime client for requests.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / FreenetInterface.java
index 83a3253..6737d63 100644 (file)
@@ -65,12 +65,10 @@ public class FreenetInterface {
         *
         * @param node
         *            The node to interact with
-        * @param client
-        *            The high-level client
         */
-       public FreenetInterface(Node node, HighLevelSimpleClient client) {
+       public FreenetInterface(Node node) {
                this.node = node;
-               this.client = client;
+               this.client = node.clientCore.makeClient(RequestStarter.INTERACTIVE_PRIORITY_CLASS, false, true);
        }
 
        //
@@ -153,7 +151,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();
                                        }
                                }