Skip to content

Commit

Permalink
fix: moving source close to the executor (just like doConsume)
Browse files Browse the repository at this point in the history
close: #6354

Signed-off-by: Steve Hawkins <[email protected]>
  • Loading branch information
shawkins authored Sep 20, 2024
1 parent cd3dc93 commit b5c9a5c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* Fix #6281: use GitHub binary repo for Kube API Tests
* Fix #6282: Allow annotated types with Pattern, Min, and Max with Lists and Maps and CRD generation
* Fix #5480: Move `io.fabric8:zjsonpatch` to KubernetesClient project
* Fix #6354: Prevent deadlock in okhttp AsyncBody.cancel

#### Dependency Upgrade
* Fix #6052: Removed dependency on no longer maintained com.github.mifmif:generex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ public CompletableFuture<Void> done() {

@Override
public void cancel() {
Utils.closeQuietly(source);
// closing from a non dispatcher thread risks deadlock because close is
// a long-running operation that may need to re-obtain the dispatcher lock
// and the thread may already be holding other locks
executor.execute(() -> Utils.closeQuietly(source));
done.cancel(false);
}
}
Expand Down

0 comments on commit b5c9a5c

Please sign in to comment.