diff --git a/library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java b/library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java index c3811ff3..ba79f5af 100644 --- a/library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java +++ b/library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java @@ -587,8 +587,8 @@ private void fetchWithMultipleConnection(final List connectionM final String path = model.getTempFilePath(); if (FileDownloadLog.NEED_LOG) { - FileDownloadLog.d(this, "fetch data with multiple connection(count: [%d]) for task[%d]", - connectionModelList.size(), id); + FileDownloadLog.d(this, "fetch data with multiple connection(count: [%d]) for task[%d] totalLength[%d]", + connectionModelList.size(), id, totalLength); } long totalOffset = 0; @@ -607,7 +607,7 @@ private void fetchWithMultipleConnection(final List connectionM totalOffset += (connectionModel.getCurrentOffset() - connectionModel.getStartOffset()); - if (connectionModel.getEndOffset() == connectionModel.getCurrentOffset() - 1) { + if (contentLength == 0) { // [start, end), offset contain the start one, so need - 1. // it has already done, so pass. if (FileDownloadLog.NEED_LOG) {