From 21504ae986215cd0371801a2d30b1b5d2a756238 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 22 Oct 2010 07:31:27 +0200 Subject: [PATCH] =?utf8?q?Don=E2=80=98t=20download=20a=20Sone=20more=20tha?= =?utf8?q?n=20once.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/sone/core/SoneDownloader.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java index 4469d2f..34f48d9 100644 --- a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java +++ b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java @@ -111,6 +111,9 @@ public class SoneDownloader extends AbstractService { * The Sone to fetch */ public void fetchSone(Sone sone) { + if (core.getSoneStatus(sone) == SoneStatus.downloading) { + return; + } logger.log(Level.FINE, "Starting fetch for Sone “%s” from %s…", new Object[] { sone, sone.getRequestUri().setMetaString(new String[] { "sone.xml" }) }); FreenetURI requestUri = sone.getRequestUri().setMetaString(new String[] { "sone.xml" }); core.setSoneStatus(sone, SoneStatus.downloading); -- 2.7.4