Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
surbhigarg92 committed Dec 31, 2024
1 parent ab9f3c5 commit cb3495e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2048,7 +2048,7 @@ boolean isClosed() {

// Does various pool maintenance activities.
void maintainPool() {
Instant currTime = clock.instant();
Instant currTime;
synchronized (lock) {
if (SessionPool.this.isClosed()) {
return;
Expand All @@ -2061,6 +2061,7 @@ void maintainPool() {
}
this.prevNumSessionsAcquired = SessionPool.this.numSessionsAcquired;

currTime = clock.instant();
// Reset the start time for recording the maximum number of sessions in the pool
if (currTime.isAfter(SessionPool.this.lastResetTime.plus(Duration.ofMinutes(10)))) {
SessionPool.this.maxSessionsInUse = SessionPool.this.numSessionsInUse;
Expand Down

0 comments on commit cb3495e

Please sign in to comment.