From: David ‘Bombe’ Roden Date: Sat, 16 Oct 2010 16:02:10 +0000 (+0200) Subject: Only load remote Sones after loading configuration. X-Git-Tag: 0.1-RC1~265 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=62361f7814c1ad34bfa182c8f84b4f484b13241b;p=Sone.git Only load remote Sones after loading configuration. --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index d098456..6ecd5fc 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -536,7 +536,6 @@ public class Core extends AbstractService { String friendKey = configuration.getStringValue(friendPrefix + "/Key").getValue(null); String friendName = configuration.getStringValue(friendPrefix + "/Name").getValue(null); friendSone.setRequestUri(new FreenetURI(friendKey)).setName(friendName); - loadSone(friendKey); sone.addFriend(friendSone); } @@ -548,6 +547,11 @@ public class Core extends AbstractService { } while (true); logger.log(Level.INFO, "Loaded %d Sones.", getSones().size()); + /* load all remote Sones. */ + for (Sone remoteSone : getRemoteSones()) { + loadSone(remoteSone); + } + logger.exiting(Core.class.getName(), "loadConfiguration()"); }