Merge pull request #484 from nitincchauhan/dev

if minimumIdle > maxPoolSize, no need to set maxPoolSize too
pull/489/merge
Brett Wooldridge 10 years ago
commit b801757ae6

@ -787,9 +787,12 @@ public class HikariConfig implements HikariConfigMXBean
validationTimeout = connectionTimeout;
}
if (minIdle < 0 || minIdle > maxPoolSize) {
if (minIdle < 0) {
minIdle = maxPoolSize;
}
else if (minIdle > maxPoolSize) {
maxPoolSize = minIdle;
}
if (maxLifetime < 0) {
LOGGER.error("maxLifetime cannot be negative.");
@ -806,6 +809,7 @@ public class HikariConfig implements HikariConfigMXBean
}
if (idleTimeout + TimeUnit.SECONDS.toMillis(1) > maxLifetime && maxLifetime > 0) {
LOGGER.warn("idleTimeout is close to or greater than maxLifetime, disabling it.");
maxLifetime = idleTimeout;
idleTimeout = 0;
}
if (maxLifetime == 0 && idleTimeout == 0) {

Loading…
Cancel
Save