From: David ‘Bombe’ Roden Date: Mon, 11 Feb 2013 21:24:08 +0000 (+0100) Subject: Don’t reregister a USK if it already is registered. X-Git-Tag: 0.8.5^2~3^2~11 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=502286e9afcad2ec3af1695af686ba6f671ba2ea;p=Sone.git Don’t reregister a USK if it already is registered. --- diff --git a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java index f493fdc..e0ee363 100644 --- a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java +++ b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java @@ -97,10 +97,9 @@ public class SoneDownloader extends AbstractService { * The Sone to add */ public void addSone(Sone sone) { - if (!sones.add(sone)) { - freenetInterface.unregisterUsk(sone); + if (sones.add(sone)) { + freenetInterface.registerUsk(sone, this); } - freenetInterface.registerUsk(sone, this); } /**