Revert "Don’t reregister a USK if it already is registered."
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 30 Jun 2013 16:37:06 +0000 (18:37 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 30 Jun 2013 16:37:06 +0000 (18:37 +0200)
This reverts commit 502286e9afcad2ec3af1695af686ba6f671ba2ea.

src/main/java/net/pterodactylus/sone/core/SoneDownloader.java

index e0ee363..f493fdc 100644 (file)
@@ -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);
        }
 
        /**