Change to call suspend on main thread when expiration handler called. Issue #1399
This commit is contained in:
parent
bcc1a1f5b5
commit
26f49d4b51
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue