Skip to content

Commit

Permalink
Ensure the permit is returned when the Borrower is cancelled (#268)
Browse files Browse the repository at this point in the history
Signed-off-by: Violeta Georgieva <[email protected]>
  • Loading branch information
violetagg authored Jan 30, 2025
1 parent 166cb80 commit 51b8e06
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ private void drainLoop() {
*=======================*/
Borrower<POOLABLE> borrower = pendingPoll(borrowers);
if (borrower == null || borrower.get()) {
poolConfig.allocationStrategy().returnPermits(permits);
continue; //we expect to detect pool is shut down in next round or the Borrower was cancelled
}
if (isDisposed()) {
Expand Down

0 comments on commit 51b8e06

Please sign in to comment.