Change to call suspend on main thread when expiration handler called. Issue #1399

This commit is contained in:
Maurice Parker 2019-12-04 16:56:09 -07:00
parent bcc1a1f5b5
commit 26f49d4b51
1 changed files with 3 additions and 1 deletions

View File

@ -365,7 +365,9 @@ private extension AppDelegate {
// set expiration handler // set expiration handler
task.expirationHandler = { [weak task] in task.expirationHandler = { [weak task] in
DispatchQueue.main.sync {
self.suspendApplication() self.suspendApplication()
}
os_log("Accounts refresh processing terminated for running too long.", log: self.log, type: .info) os_log("Accounts refresh processing terminated for running too long.", log: self.log, type: .info)
task?.setTaskCompleted(success: false) task?.setTaskCompleted(success: false)
} }