Skip to content

Commit

Permalink
[Issue 728] Background completion handler is now always called on mai…
Browse files Browse the repository at this point in the history
…n queue.
  • Loading branch information
cnoon committed Sep 7, 2015
1 parent 2d9d873 commit 4264b9d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Source/Manager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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?() }
}
}

Expand Down

0 comments on commit 4264b9d

Please sign in to comment.