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 for OperatorOnErrorResumeNextViaObservable and async Resume #312

Merged
merged 2 commits into from
Jul 31, 2013

Conversation

petermd
Copy link
Contributor

@petermd petermd commented Jul 27, 2013

This patch is to ensure that OnErrorResumeNextViaObservable handles source Observables that emit invalid sequences of onNext/onError/onCompleted.

Please see #306 for a more detailed description of how this can occur (and what other fixes might be needed)

To re-create the issue the provided resume Observable itself must be async. Because it does not complete immediately there is a window where the source Observable can produce additional events which are then propogated into the output.

The fix ensures the operator only propogates onNext/onCompleted as long as the original subscription is valid. It also prevents the resume subscription happening more than once even if multiple onError events being received.

@cloudbees-pull-request-builder

RxJava-pull-requests #187 SUCCESS
This pull request looks good

@benjchristensen
Copy link
Member

Looks like a good fix. Thanks @petermd for catching and fixing this and including unit tests.

benjchristensen added a commit that referenced this pull request Jul 31, 2013
Fix for OperatorOnErrorResumeNextViaObservable and async Resume
@benjchristensen benjchristensen merged commit 69b46ce into ReactiveX:master Jul 31, 2013
rickbw pushed a commit to rickbw/RxJava that referenced this pull request Jan 9, 2014
Fix for OperatorOnErrorResumeNextViaObservable and async Resume
rickbw pushed a commit to rickbw/RxJava that referenced this pull request Jan 9, 2014
- Stop catching the error and passing to onError and instead let the SafeObserver handle it which will then prevent subsequent onNext calls and/or unsubscribe when a failure occurs.
- This also solves the OnErrorResumeNext issue fixed in ReactiveX#312 but those changes still seem valid so I'll leave them.

Related to ReactiveX#216 and ReactiveX#312
EmteZogaf pushed a commit to EmteZogaf/RxJava that referenced this pull request Feb 19, 2014
- Stop catching the error and passing to onError and instead let the SafeObserver handle it which will then prevent subsequent onNext calls and/or unsubscribe when a failure occurs.
- This also solves the OnErrorResumeNext issue fixed in ReactiveX#312 but those changes still seem valid so I'll leave them.

Related to ReactiveX#216 and ReactiveX#312
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.

None yet

3 participants