diff --git a/Aria/src/main/java/com/arialyy/aria/core/common/AbsFileer.java b/Aria/src/main/java/com/arialyy/aria/core/common/AbsFileer.java index c6066e96..78c0fe71 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/common/AbsFileer.java +++ b/Aria/src/main/java/com/arialyy/aria/core/common/AbsFileer.java @@ -122,8 +122,11 @@ public abstract class AbsFileer 0) Thread.sleep(mSleepTime); + if (STATE.isCancel || STATE.isStop){ + break; + } + if (mSleepTime > 0) { + Thread.sleep(mSleepTime); + } file.write(buffer, 0, len); progress(len); } - if (STATE.isCancel || STATE.isStop) return; + if (STATE.isCancel || STATE.isStop){ + return; + } //支持断点的处理 if (mConfig.SUPPORT_BP) { ALog.i(TAG, "任务【" + mConfig.TEMP_FILE.getName() + "】线程__" + mConfig.THREAD_ID + "__下载完毕"); diff --git a/app/src/main/assets/aria_config.xml b/app/src/main/assets/aria_config.xml index 92324c01..0220148e 100644 --- a/app/src/main/assets/aria_config.xml +++ b/app/src/main/assets/aria_config.xml @@ -8,7 +8,7 @@ - +