-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid task ids used for expiration handlers. #13
Labels
Comments
Yup. |
garrettmoon
added a commit
that referenced
this issue
Jul 28, 2015
This should fix two issues: - Because taskID was being captured before being set, the expiration handler had an invalid taskID. - If the expiration handler was called, and then PINCacheEndBackgroundTask was called, it would try to end a task that had already ended.
@jaredsinclair Let me know what you think of #14 |
lg™ |
garrettmoon
added a commit
that referenced
this issue
Jul 30, 2015
Invalid task ids used for expiration handlers. #13
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The macro for beginning a background task looks like this:
UIBackgroundTaskIdentifier
is a value type, so when the block is created it capturestaskID
when it equalsUIBackgroundTaskInvalid
. It never captures the actual task identifier, so if the expiration handler pops the actual task isn't properly cancelled.The text was updated successfully, but these errors were encountered: