From 502286e9afcad2ec3af1695af686ba6f671ba2ea Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 11 Feb 2013 22:24:08 +0100 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20reregister=20a=20USK=20if=20it?= =?utf8?q?=20already=20is=20registered.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/sone/core/SoneDownloader.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); } /** -- 2.7.4