From a3dc787fb02d552b27022a6ca86acaf09d6356d0 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sun, 8 Dec 2019 10:00:20 -0700 Subject: [PATCH] Change to call completion when exiting early. Issue #1421 --- Frameworks/Account/LocalAccount/LocalAccountRefresher.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Frameworks/Account/LocalAccount/LocalAccountRefresher.swift b/Frameworks/Account/LocalAccount/LocalAccountRefresher.swift index dff3bdb7c..81ff9893b 100644 --- a/Frameworks/Account/LocalAccount/LocalAccountRefresher.swift +++ b/Frameworks/Account/LocalAccount/LocalAccountRefresher.swift @@ -63,16 +63,19 @@ extension LocalAccountRefresher: DownloadSessionDelegate { func downloadSession(_ downloadSession: DownloadSession, downloadDidCompleteForRepresentedObject representedObject: AnyObject, response: URLResponse?, data: Data, error: NSError?, completion: @escaping () -> Void) { guard let feed = representedObject as? WebFeed, !data.isEmpty, !isSuspended else { + completion() return } if let error = error { print("Error downloading \(feed.url) - \(error)") + completion() return } let dataHash = (data as NSData).rs_md5HashString() if dataHash == feed.contentHash { + completion() return }