From: David ‘Bombe’ Roden Date: Sun, 30 Jun 2013 16:37:06 +0000 (+0200) Subject: Revert "Don’t reregister a USK if it already is registered." X-Git-Tag: 0.8.6^2~15 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=58f2b28b4cbddd2dd84d666274108d32d3983109;p=Sone.git Revert "Don’t reregister a USK if it already is registered." This reverts commit 502286e9afcad2ec3af1695af686ba6f671ba2ea. --- diff --git a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java index e0ee363..f493fdc 100644 --- a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java +++ b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java @@ -97,9 +97,10 @@ public class SoneDownloader extends AbstractService { * The Sone to add */ public void addSone(Sone sone) { - if (sones.add(sone)) { - freenetInterface.registerUsk(sone, this); + if (!sones.add(sone)) { + freenetInterface.unregisterUsk(sone); } + freenetInterface.registerUsk(sone, this); } /**