mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-30 09:18:18 +00:00
Avoid a potential hang by calling the previous completion before setting a new one.
This commit is contained in:
1 parent
3ffd90ff2b
commit
4544328042
1 file changed
+5
@@ -143,6 +143,11 @@ import os
|
||||
|
||||
let urls = filteredFeeds.compactMap { Self.url(for: $0) }
|
||||
|
||||
// This refresh replaces any in-flight one, so resume its caller rather than stranding it.
|
||||
if let previousCompletion = self.completion {
|
||||
previousCompletion()
|
||||
}
|
||||
|
||||
self.completion = completion
|
||||
downloadSession.download(Set(urls))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user