Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

Commit b3fde3d

Browse files
committed
持久化问题修复
1 parent ec3498c commit b3fde3d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/lee/study/down/HttpDownServer.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@ public static void start(int port) {
9898
TaskInfo taskInfo = httpDownInfo.getTaskInfo();
9999
taskInfo.setCallback(new HttpDownStartCallback());
100100
//全部标记为失败,等待重新下载
101-
taskInfo.getChunkInfoList().forEach(chunk -> chunk.setStatus(3));
101+
taskInfo.getChunkInfoList().forEach(chunk -> {
102+
if (chunk.getStatus() == 1) {
103+
chunk.setStatus(3);
104+
}
105+
});
102106
} else {
103107
//下载完成的
104108
TaskInfo temp = new TaskInfo();

0 commit comments

Comments
 (0)