Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
violetagg committed Jun 14, 2024
1 parent 9999827 commit e86b5c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reactor-pool/src/main/java/reactor/pool/SimpleDequePool.java
Original file line number Diff line number Diff line change
Expand Up @@ -585,10 +585,10 @@ void pendingOffer(Borrower<POOLABLE> pending) {
postOffer = PENDING_SIZE.incrementAndGet(this);
}

boolean noIdle = idleSize == 0;
int idle = idleSize;
int estimatePermitCount = poolConfig.allocationStrategy().estimatePermitCount();

if (noIdle && (estimatePermitCount == 0 || estimatePermitCount < postOffer)) {
if (idle + estimatePermitCount < postOffer) {
pending.pendingAcquireStart = clock.millis();
if (!pending.pendingAcquireTimeout.isZero()) {
pending.timeoutTask = config().pendingAcquireTimer().apply(pending, pending.pendingAcquireTimeout);
Expand Down

0 comments on commit e86b5c8

Please sign in to comment.