pull/492/head
Nitin 9 years ago
parent 53ce83380f
commit ce1545bb39

@ -435,8 +435,8 @@ public class HikariPool extends PoolBase implements HikariPoolMXBean, IBagStateL
final long maxLifetime = config.getMaxLifetime();
if (maxLifetime > 0) {
// variance up to 2.5% of the maxlifetime
final long variance = maxLifetime > 10_000 ? ThreadLocalRandom.current().nextLong( Math.max(10_000, maxLifetime / 40) ) : 0;
// variance up to 2.5% of the maxlifetime
final long variance = maxLifetime > 10_000 ? ThreadLocalRandom.current().nextLong( Math.max(10_000, maxLifetime / 40) ) : 0;
final long lifetime = maxLifetime - variance;
poolEntry.setFutureEol(houseKeepingExecutorService.schedule(new Runnable() {
@Override
@ -573,6 +573,7 @@ public class HikariPool extends PoolBase implements HikariPoolMXBean, IBagStateL
quietlySleep(sleepBackoff);
sleepBackoff = Math.min(connectionTimeout / 2, (long) (sleepBackoff * 1.3));
}
// Pool is at max size
return Boolean.FALSE;
}
}

Loading…
Cancel
Save