Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

非手动杀死app(崩溃或者stop the running scheme or application),出现bug #34

Closed
ZY-Merry opened this issue May 18, 2018 · 3 comments

Comments

@ZY-Merry
Copy link

手机信息 (please complete the following information):

  • Device: iPad,iPhone所有型号
  • OS: [e.g. iOS8.1]
  • YCDownloadSession Version [1.2.5]

如何复现
1、运行程序,开始一个下载
2、停止程序运行(stop the running scheme or application),非手动杀死app,所以后台任务继续下载
3、重新启动程序 ,开始相同的下载(此时原来的后台任务还在下载)
4、- (void)URLSession:(NSURLSession *)session
downloadTask:(NSURLSessionDownloadTask *)downloadTask
didWriteData:(int64_t)bytesWritten
totalBytesWritten:(int64_t)totalBytesWritten
totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite
在此方法中,有两个downloadTask 根据 YCDownloadTask *task = [self getDownloadTaskWithUrl:[YCDownloadTask getURLFromTask:downloadTask]];找到了同一个YCDownloadTask,task.downloadedSize出现异常,表现下载进度闪烁

这样,如果出现崩溃现象,再次启动就可能出现这个bug!请问怎样处理这种bug?

@SuperManPLA
Copy link

不用闪退,崩溃,频繁切换wifi环境,也会出现2个task下载一个任务,下载进度闪烁在2个进度之间,跟我提的bug是同一个。

@ZY-Merry
Copy link
Author

那你是怎么处理这个问题的呢? @SuperManPLA

@onezens
Copy link
Owner

onezens commented Sep 12, 2018

新版本修复 2.0.0

@onezens onezens closed this as completed Sep 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants