Skip to content

Commit

Permalink
Fix ReactiveX#544 ReplaySubject emits items received after onError
Browse files Browse the repository at this point in the history
  • Loading branch information
benjchristensen committed Dec 11, 2013
1 parent 72bf445 commit 8cb9e9b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rxjava-core/src/main/java/rx/subjects/ReplaySubject.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ public void onError(Throwable e)
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);
Expand Down

0 comments on commit 8cb9e9b

Please sign in to comment.