|
|
@@ -132,9 +132,8 @@ public class Manager {
|
|
|
self.session.serverTrustPolicyManager = serverTrustPolicyManager
|
|
|
|
|
|
self.delegate.sessionDidFinishEventsForBackgroundURLSession = { [weak self] session in
|
|
|
- if let strongSelf = self {
|
|
|
- strongSelf.backgroundCompletionHandler?()
|
|
|
- }
|
|
|
+ guard let strongSelf = self else { return }
|
|
|
+ dispatch_async(dispatch_get_main_queue()) { strongSelf.backgroundCompletionHandler?() }
|
|
|
}
|
|
|
}
|
|
|
|