Skip to content

Commit

Permalink
Fix cancellation order in CancellableRateLimitedFluxIterator (#104259) (
Browse files Browse the repository at this point in the history
  • Loading branch information
fcofdez authored Jan 11, 2024
1 parent 9923a87 commit f83dd8e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions docs/changelog/104259.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 104259
summary: Fix cancellation order in `CancellableRateLimitedFluxIterator`
area: Snapshot/Restore
type: bug
issues:
- 103054
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ public void onNext(T element) {
}

public void cancel() {
done = true;
cancelSubscription();
clearQueue();
done = true;
// cancel should be called from the consumer
// thread, but to avoid potential deadlocks
// we just try to release a possibly blocked
Expand All @@ -178,9 +178,9 @@ public void cancel() {

@Override
public void onError(Throwable t) {
done = true;
clearQueue();
error = t;
done = true;
signalConsumer();
}

Expand Down

0 comments on commit f83dd8e

Please sign in to comment.