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

Fix potential crashes in asFlow extensions for RxJava 2&3 integrations #2319

Closed
wants to merge 6 commits into from

Conversation

LouisCAD
Copy link
Contributor

Fixes #2299

Related to issue #974

@mhernand40
Copy link

Thanks for taking this. May I request that the fix also be applied to Rx2 as well please? 🙂

@LouisCAD
Copy link
Contributor Author

Don't you want to do it now that you've seen my example, @mhernand40?

@mhernand40
Copy link

@LouisCAD Typically I've seen bug fixes for Coroutines <-> Reactive APIs applied all throughout where applicable in the same PR. Hence why I am asking it be addressed within this PR. But I am also okay with tackling it in a separate PR provided this one gets approved first. Anyhow, FWIW I personally would be grateful if it would be addressed in this PR. 🙂

@LouisCAD LouisCAD changed the title Fix potential crash in RX3 asFlow extension Fix potential crashes in asFlow extensions for RxJava 2&3 integrations Oct 19, 2020
@LouisCAD
Copy link
Contributor Author

Done.

@qwwdfsad qwwdfsad self-requested a review October 20, 2020 08:53
reactive/kotlinx-coroutines-rx2/src/RxConvert.kt Outdated Show resolved Hide resolved
reactive/kotlinx-coroutines-rx2/src/RxConvert.kt Outdated Show resolved Hide resolved
…ss-tests

Add rx2/rx3 stress tests for ObservableSource.asFlow()
@mhernand40
Copy link

I'm really hoping this makes it into the final Coroutines 1.4 release. We had a major incident recently due to this issue where app crashes surged in production and we ultimately had to push out a hot fix. I was planning in the meantime to provide our own internal implementation of ObservableSource.asFlow() which would pretty much be a copy/paste of this implementation but I am hoping that updating to 1.4 will be all we need. 🙂

@qwwdfsad qwwdfsad mentioned this pull request Oct 23, 2020
@qwwdfsad
Copy link
Member

I've opened #2333 where I squashed all the changes into a single commit and added stable and small reproducer.

Thanks for taking care of this issue!

@qwwdfsad qwwdfsad closed this Oct 23, 2020
@LouisCAD LouisCAD deleted the patch-1 branch October 23, 2020 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants