lingochamp / FileDownloader

Multitask、MultiThread(MultiConnection)、Breakpoint-resume、High-concurrency、Simple to use、Single/NotSingle-process
Apache License 2.0
10.98k stars 2.18k forks source link

用for循环单任务去下载动图 在移动网络下有些图片下载不了,而在wifi下则可以 #1094

Open dreamerleeli opened 5 years ago

dreamerleeli commented 5 years ago

08-14 17:39:50.919 18674-20260/com.rj.syslearning D/FileDownloader.FileDownloadManager: has already started download -1559562594 08-14 17:39:50.953 18674-20299/com.rj.syslearning D/FileDownloader.DownloadTask: setPath /storage/emulated/0/SyscLearning/com.rj.syslearning/SyscLearning.mainlist/temp/cc46726890f01f3c116fa4e6bd0d2ad0.8264.lck 08-14 17:39:50.953 18674-20299/com.rj.syslearning V/FileDownloader.DownloadTaskHunter: call start Url[http://183.47.42.221:8038/uploadfile/pic/testpic.gif], Path[/storage/emulated/0/SyscLearning/com.rj.syslearning/SyscLearning.mainlist/temp/cc46726890f01f3c116fa4e6bd0d2ad0.8264.lck] Listener[null], Tag[null] 08-14 17:39:50.953 18674-20315/com.rj.syslearning D/FileDownloader.DownloadTask: setPath /storage/emulated/0/SyscLearning/com.rj.syslearning/SyscLearning.mainlist/temp/cc46726890f01f3c116fa4e6bd0d2ad0.8264.lck 08-14 17:39:50.953 18674-20315/com.rj.syslearning V/FileDownloader.DownloadTaskHunter: call start Url[http://183.47.42.221:8038/uploadfile/pic/testpic.gif], Path[/storage/emulated/0/SyscLearning/com.rj.syslearning/SyscLearning.mainlist/temp/cc46726890f01f3c116fa4e6bd0d2ad0.8264.lck] Listener[null], Tag[null] 08-14 17:39:50.953 18674-20299/com.rj.syslearning V/FileDownloader.DownloadTaskHunter: the task[-1559562594] has been into the launch pool. 08-14 17:39:50.953 18674-20261/com.rj.syslearning D/FileDownloader.FileDownloadMessenger: notify begin -1559562594@com.liulishuo.filedownloader.DownloadTask@fc0b2ae 08-14 17:39:50.954 18674-20261/com.rj.syslearning V/FileDownloader.DownloadTaskHunter: filedownloader:lifecycle:start com.liulishuo.filedownloader.DownloadTaskHunter@37e0bdc by 11 08-14 17:39:50.954 18674-20315/com.rj.syslearning V/FileDownloader.DownloadTaskHunter: the task[-1559562594] has been into the launch pool. 08-14 17:39:50.954 18674-20261/com.rj.syslearning V/FileDownloader.FileDownloadList: add list in all -1559562594@com.liulishuo.filedownloader.DownloadTask@fc0b2ae 11 2 08-14 17:39:50.954 18674-20274/com.rj.syslearning D/FileDownloader.FileDownloadMessenger: notify begin -1559562594@com.liulishuo.filedownloader.DownloadTask@c11484f 08-14 17:39:50.954 18674-20274/com.rj.syslearning V/FileDownloader.DownloadTaskHunter: filedownloader:lifecycle:start com.liulishuo.filedownloader.DownloadTaskHunter@ee94bba by 11 08-14 17:39:50.954 18674-20261/com.rj.syslearning D/FileDownloader.FileDownloadManager: request start the task with url(http://183.47.42.221:8038/uploadfile/pic/testpic.gif) path(/storage/emulated/0/SyscLearning/com.rj.syslearning/SyscLearning.mainlist/temp/cc46726890f01f3c116fa4e6bd0d2ad0.8264.lck) isDirectory(FALSE) 08-14 17:39:50.954 18674-20274/com.rj.syslearning V/FileDownloader.FileDownloadList: add list in all -1559562594@com.liulishuo.filedownloader.DownloadTask@c11484f 11 3 08-14 17:39:50.954 18674-20261/com.rj.syslearning D/FileDownloader.MessageSnapshotGate: ~~~callback -1559562594 old[3] new[-4] 3 08-14 17:39:50.955 18674-20261/com.rj.syslearning D/FileDownloader.DownloadTaskHunter: can't update mStatus change by keep flow, 3, but the current mStatus is 3, -1559562594 08-14 17:39:50.955 18674-20261/com.rj.syslearning D/FileDownloader.FileDownloadMessenger: notify warn -1559562594@com.liulishuo.filedownloader.DownloadTask@fc0b2ae 08-14 17:39:50.955 18674-20261/com.rj.syslearning V/FileDownloader.DownloadTaskHunter: filedownloader:lifecycle:over com.liulishuo.filedownloader.DownloadTaskHunter@37e0bdc by -4 08-14 17:39:50.955 18674-20261/com.rj.syslearning D/FileDownloader.MessageSnapshotGate: updateKeepFlow 08-14 17:39:50.955 18674-20261/com.rj.syslearning D/FileDownloader.FileDownloadManager: has already started download -1559562594 08-14 17:39:50.955 18674-20274/com.rj.syslearning D/FileDownloader.FileDownloadManager: request start the task with url(http://183.47.42.221:8038/uploadfile/pic/testpic.gif) path(/storage/emulated/0/SyscLearning/com.rj.syslearning/SyscLearning.mainlist/temp/cc46726890f01f3c116fa4e6bd0d2ad0.8264.lck) isDirectory(FALSE) 08-14 17:39:50.956 18674-20274/com.rj.syslearning D/FileDownloader.MessageSnapshotGate: ~~~callback -1559562594 old[3] new[-4] 2 08-14 17:39:50.956 18674-20274/com.rj.syslearning D/FileDownloader.DownloadTaskHunter: can't update mStatus change by keep flow, 3, but the current mStatus is 3, -1559562594 08-14 17:39:50.956 18674-20274/com.rj.syslearning D/FileDownloader.FileDownloadMessenger: notify warn -1559562594@com.liulishuo.filedownloader.DownloadTask@c11484f 08-14 17:39:50.956 18674-20274/com.rj.syslearning V/FileDownloader.DownloadTaskHunter: filedownloader:lifecycle:over com.liulishuo.filedownloader.DownloadTaskHunter@ee94bba by -4 08-14 17:39:50.957 18674-20274/com.rj.syslearning D/FileDownloader.MessageSnapshotGate: updateKeepFlow 08-14 17:39:50.957 18674-20274/com.rj.syslearning D/FileDownloader.FileDownloadManager: has already started download -1559562594 08-14 17:39:50.958 18674-20263/com.rj.syslearning D/FileDownloader.FetchDataTask: require flushAndSync id[-1559562594] index[-1] offset[418613], consume[15] 08-14 17:39:50.959 18674-20263/com.rj.syslearning D/FileDownloader.DownloadLaunchRunnable: the connection has been completed(-1): [0, -1) 418613 08-14 17:39:50.960 18674-20262/com.rj.syslearning D/FileDownloader.MessageSnapshotGate: ~~~callback -1559562594 old[3] new[-3] 1 08-14 17:39:50.961 18674-20262/com.rj.syslearning V/FileDownloader.FileDownloadList: remove -1559562594@com.liulishuo.filedownloader.DownloadTask@b17b4db left -3 0 08-14

rantianhua commented 5 years ago

你开启了两个一样的任务,所以会有 warn 回调,在你目前提供的日志看来,一切都是正常的。添加的两个同样的任务,一个回调了 warn 表示该 Task 正在下载了,另一个下载完成。

所以从你提供的信息还定位不了你的问题。

rantianhua commented 4 years ago

日志不完整,能提供下更加完整的日志吗?包括报错的信息。