Reregister USKs when Sone is already known to the downloader.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 8 Mar 2011 12:50:53 +0000 (13:50 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 8 Mar 2011 12:50:53 +0000 (13:50 +0100)
src/main/java/net/pterodactylus/sone/core/SoneDownloader.java

index b2d1da4..7022f5e 100644 (file)
@@ -93,10 +93,10 @@ public class SoneDownloader extends AbstractService {
         *            The Sone to add
         */
        public void addSone(Sone sone) {
-               if (sones.add(sone)) {
+               if (!sones.add(sone)) {
                        freenetInterface.unregisterUsk(sone);
-                       freenetInterface.registerUsk(sone, this);
                }
+               freenetInterface.registerUsk(sone, this);
        }
 
        /**