From: David ‘Bombe’ Roden Date: Tue, 8 Mar 2011 12:50:53 +0000 (+0100) Subject: Reregister USKs when Sone is already known to the downloader. X-Git-Tag: 0.5.1^2~7 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=52a60b132ce14180b0d614bbccb1137b09a78eae;p=Sone.git Reregister USKs when Sone is already known to the downloader. --- diff --git a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java index b2d1da4..7022f5e 100644 --- a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java +++ b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java @@ -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); } /**