Eliminate double-execution of shutdown code.

pull/77/head
Brett Wooldridge 11 years ago
parent c813dbd997
commit bbac41d3e9

@ -224,18 +224,21 @@ public final class HikariPool implements HikariPoolMBean, IBagStateListener
public void shutdown()
{
isShutdown = true;
houseKeepingTimer.cancel();
addConnectionExecutor.shutdown();
if (!isShutdown)
{
isShutdown = true;
houseKeepingTimer.cancel();
addConnectionExecutor.shutdown();
LOGGER.info("HikariCP pool {} is being shutdown.", configuration.getPoolName());
logPoolState("State at shutdown ");
LOGGER.info("HikariCP pool {} is being shutdown.", configuration.getPoolName());
logPoolState("State at shutdown ");
closeIdleConnections();
closeIdleConnections();
if (isRegisteredMbeans)
{
HikariMBeanElf.unregisterMBeans(configuration, this);
if (isRegisteredMbeans)
{
HikariMBeanElf.unregisterMBeans(configuration, this);
}
}
}

Loading…
Cancel
Save