Skip to content

Commit 755e4bf

Browse files
committed
Cancel the subscription after receiving all of the pertinent emissions (reactive-streams#259).
1 parent 7121cae commit 755e4bf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tck/src/main/java/org/reactivestreams/tck/PublisherVerification.java

+2
Original file line numberDiff line numberDiff line change
@@ -1044,6 +1044,8 @@ public void onNext(T element) {
10441044
if (callsCounter > 0) {
10451045
subscription.value().request(Long.MAX_VALUE - 1);
10461046
callsCounter--;
1047+
} else {
1048+
subscription.value().cancel();
10471049
}
10481050
} else {
10491051
env.flop(String.format("Subscriber::onNext(%s) called before Subscriber::onSubscribe", element));

0 commit comments

Comments
 (0)