Skip to content
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

INSURLSessionTaskOperation crashes when cancelling a running NSURLSessionTask #15

Merged

Conversation

Frankacy
Copy link
Contributor

@Frankacy Frankacy commented May 6, 2016

I was encountering an issue where INSURLSessionTaskOperation was crashing due to KVO.

The issue happens when a task is in state == NSURLSessionTaskStateRunning and is then canceled. Under normal circumstances, INSURLSessionTaskOperation removes itself as an observer when a task completes successfully. However, it never removes itself when the task is resumed, then canceled.

This pull request fixes the above bug ^_^

@m1entus m1entus merged commit 5c16109 into m1entus:master May 6, 2016
@m1entus
Copy link
Owner

m1entus commented May 6, 2016

Cool, looks good, thanks for contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants