Skip to content

Commit

Permalink
Merge pull request ReactiveX#253 from Treora/master
Browse files Browse the repository at this point in the history
Fix multiple subscription bug on operation filter
  • Loading branch information
benjchristensen committed May 1, 2013
2 parents 69e0d99 + 0a379df commit 4ceb17c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ private static class Filter<T> implements Func1<Observer<T>, Subscription> {

private final Observable<T> that;
private final Func1<T, Boolean> predicate;
private final AtomicObservableSubscription subscription = new AtomicObservableSubscription();

public Filter(Observable<T> that, Func1<T, Boolean> predicate) {
this.that = that;
this.predicate = predicate;
}

public Subscription call(final Observer<T> observer) {
final AtomicObservableSubscription subscription = new AtomicObservableSubscription();
return subscription.wrap(that.subscribe(new Observer<T>() {
public void onNext(T value) {
try {
Expand Down

0 comments on commit 4ceb17c

Please sign in to comment.