-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
ReplaySubject emits items received after onError #544
Comments
Ben and I hacked on subjects earlier this week, all subjects are/were in pretty bad shape, but we'll fix it. |
ReplaySubject is the one I didn’t touch, I refactored Publish/Behavior/Async. I’ll put Replay on my TODO. |
I think this is a trivial fix @Override
public void onNext(T args)
{
synchronized (subscriptions) {
if (isDone) {
return;
}
history.add(args);
for (Observer<? super T> observer : new ArrayList<Observer<? super T>>(subscriptions.values())) {
observer.onNext(args);
}
}
} |
We should also make sure no additional,on errors,are propagated. Sent from my iPad
|
… when exceptions are ignored. (ReactiveX#545)
This snippet
outputs
but I would expect
since items received after onError should not be emitted by ReplaySubject.
(Thank you Dragisa Krsmanovic for pointing this out)
The text was updated successfully, but these errors were encountered: