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

2.x: fix replay() cancel/dispose NPE #5064

Merged
merged 1 commit into from
Feb 3, 2017
Merged

Conversation

akarnokd
Copy link
Member

@akarnokd akarnokd commented Feb 3, 2017

This PR fixes both Flowable.replay() and Observable.replay() throwing a NullPointerException if the connection is disconnect before the upstream calls onSubscribe on the connection being established.

In practice, this requires an async cancellation to happen through refCount().unsubscribeOn() for example. The validation tests simulate this by not calling onSubscribe until the synchronous connect/disconnect happens.

Reported in #5060.

@akarnokd akarnokd added this to the 2.0 backlog milestone Feb 3, 2017
@akarnokd akarnokd merged commit 3852b1b into ReactiveX:2.x Feb 3, 2017
@akarnokd akarnokd deleted the ReplayNPEFix branch February 3, 2017 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants