Skip to content

Commit

Permalink
Add a C&S step for CompletionStagePublisher cancellation
Browse files Browse the repository at this point in the history
We're observing some RS TCK failures in slow CI conditions.
  • Loading branch information
jponge committed Mar 14, 2024
1 parent 2053e75 commit b5d31a8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ public void request(long n) {

@Override
public void cancel() {
cancelled.set(true);
completableFuture.toCompletableFuture().cancel(false);
if (cancelled.compareAndSet(false, true)) {
completableFuture.toCompletableFuture().cancel(false);
}
}
}
}

0 comments on commit b5d31a8

Please sign in to comment.