Danie1s/Tiercel

多任务tasks下载时,会多次触发failure回调

iband2011 opened this issue · 1 comments

let tasks = sessionManager.multiDownload(urls)
tasks.success(onMainQueue: true) { task in

}.failure(onMainQueue: true) { task in
if task.status == .removed {
return
}
failure?()
}

//---------------
当调用sessionManager.totalRemove()方法时,上面的failure block会被多次触发

这是正常的,因为你设置的回调的对象是 tasks