Skip to content

Commit

Permalink
Do not log warning about idleTimeout unless minimumIdle is less than …
Browse files Browse the repository at this point in the history
…maxPoolSize (because otherwise it does not apply)
  • Loading branch information
brettwooldridge committed Jan 22, 2019
1 parent b183aa1 commit c742e86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/zaxxer/hikari/HikariConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ private void validateNumerics()
maxLifetime = MAX_LIFETIME;
}

if (idleTimeout + SECONDS.toMillis(1) > maxLifetime && maxLifetime > 0) {
if (idleTimeout + SECONDS.toMillis(1) > maxLifetime && maxLifetime > 0 && minIdle < maxPoolSize) {
LOGGER.warn("{} - idleTimeout is close to or more than maxLifetime, disabling it.", poolName);
idleTimeout = 0;
}
Expand Down

0 comments on commit c742e86

Please sign in to comment.