Closed elveatles closed 5 years ago
This log comes out from NSURLSession
when an on-going task is canceled. Since it is a behavior in Foundation framework, I guess there is little Kingfisher could do.
Maybe there would be some log options in Xcode could suppress this log. But now I don't have any information on it. You can also try to ask on StackOverflow or file a radar to Apple.
Thank you for the quick reply. What a bummer that it's coming from Foundation code. I'll see what I can get out of StackOverflow or Apple.
Check List
Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.
Issue Description
Downloading images for UITableViewCells and cancelling them spams the console with error logs explaining that download tasks were cancelled even though the cancellation was intentional. Everything works as expected though. It's just the console logs that are unwanted.
What
I'm using Kinfisher to download images for UITableViewCells. I'm using
cell.imageView.kf.cancelDownloadTask()
infunc tableView(_ tableView: UITableView, didEndDisplaying cell: UITableViewCell, forRowAt indexPath: IndexPath)
to cancel image downloads for cells that are offscreen. I keep getting errors printed to the console like:
Despite this, everything seems to be working as intended. The images are being downloaded and caching just fine. It's just annoying and alarming to see these error messages in the console when I intended to cancel the downloads.
Reproduce
In
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
.Other Comment
If the
cancelDownloadTask
line is commented out, you won't see errors printed to the console.This will only happen if the images are not already cached.
Using version 5.0.0