From b101eb433c7912b2a8eff72069f8dad7717ccb87 Mon Sep 17 00:00:00 2001 From: AriaLyy <511455842@qq.com> Date: Wed, 26 Jul 2017 15:34:28 +0800 Subject: [PATCH] fix bug https://github.com/AriaLyy/Aria/issues/81 --- .../aria/core/download/downloader/DownloadGroupUtil.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/downloader/DownloadGroupUtil.java b/Aria/src/main/java/com/arialyy/aria/core/download/downloader/DownloadGroupUtil.java index 7fe1ad68..55320559 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/downloader/DownloadGroupUtil.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/downloader/DownloadGroupUtil.java @@ -378,12 +378,11 @@ public class DownloadGroupUtil implements IDownloadUtil { handleSpeed(0); mListener.onSubComplete(entity); //如果子任务完成的数量和总任务数一致,表示任务组任务已经完成 - if (mCompleteNum >= mTaskEntity.getEntity().getSubTask().size()){ + if (mCompleteNum >= mTaskEntity.getEntity().getSubTask().size()) { closeTimer(false); mListener.onComplete(); - } - //如果子任务完成数量加上失败的数量和总任务数一致,则任务组停止下载 - if (mCompleteNum + mFailNum >= mActualTaskNum) { + } else if (mCompleteNum + mFailNum >= mActualTaskNum) { + //如果子任务完成数量加上失败的数量和总任务数一致,则任务组停止下载 closeTimer(false); mListener.onComplete(); }