Make sure we are only going after a given URL once
This commit is contained in:
parent
cd4b3260b7
commit
78cefecaad
|
@ -119,7 +119,13 @@ public final class WebFeedIconDownloader {
|
|||
}
|
||||
|
||||
if let components = URLComponents(string: feed.url), let feedProvider = FeedProviderManager.shared.best(for: components) {
|
||||
guard !urlsInProgress.contains(feed.url) else {
|
||||
return nil
|
||||
}
|
||||
urlsInProgress.insert(feed.url)
|
||||
|
||||
feedProvider.iconURL(components) { result in
|
||||
self.urlsInProgress.remove(feed.url)
|
||||
switch result {
|
||||
case .success(let feedProviderURL):
|
||||
self.feedURLToIconURLCache[feed.url] = feedProviderURL
|
||||
|
|
Loading…
Reference in New Issue