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

In FoundationTransport deinit, remove self as a delegate to InputStream and OutputStream to prevent EXC_BAD_ACCESS #777

Merged
merged 1 commit into from
Jun 21, 2020

Conversation

jaltreuter
Copy link

As mentioned by @nickoto in #676 and #773, Starscream will crash if a socket is deallocated before it finishes disconnecting when using FoundationTransport. In my own testing, simply setting the delegates to inputStream and outputStream to nil in deinit is effective at preventing the crash. This makes a fair amount of sense, since Stream.delegate is an unowned property.

…am and OutputStream to prevent EXC_BAD_ACCESS
@daltoniam
Copy link
Owner

Good catch, Thanks! Appreciate the PR.

@daltoniam daltoniam merged commit 5fbeab4 into daltoniam:master Jun 21, 2020
@alexeybolv
Copy link

alexeybolv commented Jun 27, 2020

@daltoniam Hi, when are you plan to make release with this fix? I have too many crashes in my product app((
Thank you!

@Vactorwang
Copy link

@daltoniam Hi, when are you plan to make release with this fix? I have too many crashes in my product app((
Thank you!

Same

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.

4 participants