Skip to content

Commit

Permalink
Simplify cancellation
Browse files Browse the repository at this point in the history
  • Loading branch information
jponge committed Mar 14, 2024
1 parent 3608cb9 commit 2183aea
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@ public void request(long n) {

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

0 comments on commit 2183aea

Please sign in to comment.