Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
HeartPattern committed May 16, 2024
1 parent ea019aa commit f006c81
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions reactor-pool/src/main/java/reactor/pool/AbstractPool.java
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,8 @@ public void request(long n) {
boolean noIdle = pool.idleSize() == 0;
boolean noPermits = pool.poolConfig.allocationStrategy().estimatePermitCount() == 0;

pendingAcquireStart = pool.clock.millis();
if (!pendingAcquireTimeout.isZero() && noIdle && noPermits) {
pendingAcquireStart = pool.clock.millis();
timeoutTask = this.pool.config().pendingAcquireTimer().apply(this, pendingAcquireTimeout);
}
//doAcquire should interrupt the countdown if there is either an available
Expand All @@ -446,10 +446,10 @@ void stopPendingCountdown(boolean success) {
}

if (success) {
pool.metricsRecorder.recordPendingSuccessAndLatency(pool.clock.millis() - pendingAcquireStart);
} else {
pool.metricsRecorder.recordPendingFailureAndLatency(pool.clock.millis() - pendingAcquireStart);
}
pool.metricsRecorder.recordPendingSuccessAndLatency(pool.clock.millis() - pendingAcquireStart);
} else {
pool.metricsRecorder.recordPendingFailureAndLatency(pool.clock.millis() - pendingAcquireStart);
}

timeoutTask.dispose();
timeoutTask = null;
Expand Down

0 comments on commit f006c81

Please # to comment.