lingochamp / lingochamp/FileDownloader

快速切换暂停和启动这2个api会造成下载任务直接变成完成状态

Open
#803 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
11.1k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

使用demo工程发现问题:
1、把asset中同时下载数改为1:download.max-network-thread-count=1
2、使用单任务测试功能
3、快速切换第三条的开始和暂停
4、重复多次之后下载状态直接变成为complete,但是文件还没有开始下载

打印日志如下

10-23 16:17:03.732 19942-19942/com.liulishuo.filedownloader.demo E/A: ====pending===>id:-1980443967 status:6
10-23 16:17:03.772 19942-19942/com.liulishuo.filedownloader.demo E/A: ====paused===>id:-1980443967 status:-2
10-23 16:17:03.932 19942-19942/com.liulishuo.filedownloader.demo E/A: ====pending===>id:-1980443967 status:6
10-23 16:17:03.962 19942-19942/com.liulishuo.filedownloader.demo E/A: ====connected===>id:-1980443967 status:2
10-23 16:17:04.042 19942-19942/com.liulishuo.filedownloader.demo E/A: ====paused===>id:-1980443967 status:-2
10-23 16:17:04.202 19942-19942/com.liulishuo.filedownloader.demo E/A: ====pending===>id:-1980443967 status:6
10-23 16:17:04.342 19942-19942/com.liulishuo.filedownloader.demo E/A: ====paused===>id:-1980443967 status:-2
10-23 16:17:04.432 19942-19942/com.liulishuo.filedownloader.demo E/A: ====pending===>id:-1980443967 status:6
10-23 16:17:04.492 19942-19942/com.liulishuo.filedownloader.demo E/A: ====connected===>id:-1980443967 status:2
10-23 16:17:04.582 19942-19942/com.liulishuo.filedownloader.demo E/A: ====progress===>id:-1980443967 soFarBytes:726 totalBytes:2954043 status:-2
10-23 16:17:04.592 19942-19942/com.liulishuo.filedownloader.demo E/A: ====paused===>id:-1980443967 status:-2
10-23 16:17:04.702 19942-19942/com.liulishuo.filedownloader.demo E/A: ====pending===>id:-1980443967 status:1
10-23 16:17:04.732 19942-19942/com.liulishuo.filedownloader.demo E/A: ====completed===>id:-1980443967 status:-3 soFarBytes:0 totalBytes:0

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the demo project's single-task test and set download.max-network-thread-count=1, then reproduce rapid start/pause switching for the third task. Trace the logged pending, paused, connected, progress, and completed transitions; done means repeated switching no longer reports complete while the file has not downloaded.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.