Skip to content

Commit

Permalink
Ensure the permit is returned when the Borrower is cancelled
Browse files Browse the repository at this point in the history
Signed-off-by: Violeta Georgieva <violeta.georgieva@broadcom.com>
  • Loading branch information
violetagg committed Jan 30, 2025
1 parent 166cb80 commit 53ff591
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 53ff591

Please # to comment.