From 58dbc9b92a90eb17fecaf12d9ef070bce621ebdb Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 20 Aug 2013 07:21:29 +0200 Subject: [PATCH] Only remove the download immediately if there is no DCC receiver. --- src/main/java/net/pterodactylus/xdcc/core/Core.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/pterodactylus/xdcc/core/Core.java b/src/main/java/net/pterodactylus/xdcc/core/Core.java index e78c4f1..fb3e61e 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -281,12 +281,12 @@ public class Core extends AbstractExecutionThreadService { return; } - /* remove download. */ - downloads.remove(pack.name(), download.get()); - /* stop the DCC receiver. */ if (download.get().dccReceiver() != null) { download.get().dccReceiver().stop(); + } else { + /* remove download if it hasn’t started yet. */ + downloads.remove(pack.name(), download.get()); } /* remove the request from the bot, too. */ -- 2.7.4