File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
google-cloud-spanner/src/main/java/com/google/cloud/spanner Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -2048,7 +2048,7 @@ boolean isClosed() {
20482048
20492049 // Does various pool maintenance activities.
20502050 void maintainPool () {
2051- Instant currTime = clock . instant () ;
2051+ Instant currTime ;
20522052 synchronized (lock ) {
20532053 if (SessionPool .this .isClosed ()) {
20542054 return ;
@@ -2061,6 +2061,7 @@ void maintainPool() {
20612061 }
20622062 this .prevNumSessionsAcquired = SessionPool .this .numSessionsAcquired ;
20632063
2064+ currTime = clock .instant ();
20642065 // Reset the start time for recording the maximum number of sessions in the pool
20652066 if (currTime .isAfter (SessionPool .this .lastResetTime .plus (Duration .ofMinutes (10 )))) {
20662067 SessionPool .this .maxSessionsInUse = SessionPool .this .numSessionsInUse ;
You can’t perform that action at this time.
0 commit comments