Skip to content

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

Merged
akarnokd merged 1 commit intoReactiveX:2.xfrom
akarnokd:ReplayNPEFix
Feb 3, 2017
Merged

2.x: fix replay() cancel/dispose NPE#5064
akarnokd merged 1 commit intoReactiveX:2.xfrom
akarnokd:ReplayNPEFix

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