Skip to content

Commit 7c23049

Browse files
committed
don't emit MissingBackpressureException
1 parent 5160c1d commit 7c23049

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/main/java/rx/internal/operators/OnSubscribeRedo.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -236,15 +236,8 @@ public void onError(Throwable e) {
236236
@Override
237237
public void onNext(T v) {
238238
if (!done) {
239-
if (consumerCapacity.get() == 0) {
240-
child.onError(new MissingBackpressureException(
241-
"an item has arrived to this operator that was not requested, "
242-
+ "please use backpressure aware operators upstream (or insert .onBackpressureBuffer() or similar)"));
243-
return;
244-
} else {
245-
child.onNext(v);
246-
decrementConsumerCapacity();
247-
}
239+
child.onNext(v);
240+
decrementConsumerCapacity();
248241
}
249242
}
250243

@@ -382,7 +375,7 @@ public void request(final long n) {
382375
// producer will call setProducer and request with consumerCapacity on the new producer.
383376
producer.request(n);
384377
} else
385-
if (c == 0 && resumeBoundary.compareAndSet(true, false)) {
378+
if (resumeBoundary.compareAndSet(true, false)) {
386379
worker.schedule(subscribeToSource);
387380
}
388381
}

0 commit comments

Comments
 (0)