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