Merge pull request #448 from nitincchauhan/dev

using Throwable, better for backport too
pull/451/merge
Brett Wooldridge 9 years ago
commit 476180b0bc

@ -528,7 +528,7 @@ public class HikariPool extends PoolBase implements HikariPoolMXBean, IBagStateL
final PoolEntry poolEntry = connectionBag.borrow(connectionTimeout, TimeUnit.MILLISECONDS);
if (config.getMinimumIdle() == 0) {
closeConnection(poolEntry, "Initialization validation complete, closing test connection.");
closeConnection(poolEntry, "Closing connection borrowed for validation.");
}
else {
connectionBag.requite(poolEntry);

@ -99,11 +99,11 @@ abstract class PoolBase
void quietlyCloseConnection(final Connection connection, final String closureReason)
{
try {
if (connection == null) {
return;
}
try {
LOGGER.debug("{} - Closing connection {}: {}", poolName, connection, closureReason);
try {
setNetworkTimeout(connection, TimeUnit.SECONDS.toMillis(15));
@ -525,7 +525,7 @@ abstract class PoolBase
try {
dataSource.setLoginTimeout((int) TimeUnit.MILLISECONDS.toSeconds(Math.max(1000L, connectionTimeout)));
}
catch (SQLException | UnsupportedOperationException e) {
catch (Throwable e) {
LOGGER.warn("{} - Unable to set DataSource login timeout", poolName, e);
}
}

Loading…
Cancel
Save