Fix the wrong configuration name in Javadoc and rename variable (#2248)

pull/2238/head
Yanming Zhou 3 months ago committed by GitHub
parent 28f81da440
commit aa1e138fbd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -552,15 +552,15 @@ public final class HikariPool extends PoolBase implements HikariPoolMXBean, IBag
}
/**
* If initializationFailFast is configured, check that we have DB connectivity.
* If {@code initializationFailTimeout} is configured, check that we have DB connectivity.
*
* @throws PoolInitializationException if fails to create or validate connection
* @see HikariConfig#setInitializationFailTimeout(long)
*/
private void checkFailFast()
{
final var initializationTimeout = config.getInitializationFailTimeout();
if (initializationTimeout < 0) {
final var initializationFailTimeout = config.getInitializationFailTimeout();
if (initializationFailTimeout < 0) {
return;
}
@ -584,9 +584,9 @@ public final class HikariPool extends PoolBase implements HikariPoolMXBean, IBag
}
quietlySleep(SECONDS.toMillis(1));
} while (elapsedMillis(startTime) < initializationTimeout);
} while (elapsedMillis(startTime) < initializationFailTimeout);
if (initializationTimeout > 0) {
if (initializationFailTimeout > 0) {
throwPoolInitializationException(getLastConnectionFailure());
}
}

Loading…
Cancel
Save