Skip to content

Commit

Permalink
don't emit MissingBackpressureException
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmoten committed May 6, 2015
1 parent 5160c1d commit 7c23049
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/main/java/rx/internal/operators/OnSubscribeRedo.java
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,8 @@ public void onError(Throwable e) {
@Override
public void onNext(T v) {
if (!done) {
if (consumerCapacity.get() == 0) {
child.onError(new MissingBackpressureException(
"an item has arrived to this operator that was not requested, "
+ "please use backpressure aware operators upstream (or insert .onBackpressureBuffer() or similar)"));
return;
} else {
child.onNext(v);
decrementConsumerCapacity();
}
child.onNext(v);
decrementConsumerCapacity();
}
}

Expand Down Expand Up @@ -382,7 +375,7 @@ public void request(final long n) {
// producer will call setProducer and request with consumerCapacity on the new producer.
producer.request(n);
} else
if (c == 0 && resumeBoundary.compareAndSet(true, false)) {
if (resumeBoundary.compareAndSet(true, false)) {
worker.schedule(subscribeToSource);
}
}
Expand Down

0 comments on commit 7c23049

Please sign in to comment.