mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-12-26 19:18:17 +01:00
Disable hikari leak detection (#1033)
This commit is contained in:
parent
4d7be13c16
commit
30ce269873
@ -36,7 +36,6 @@ import java.sql.SQLException;
|
|||||||
import java.sql.Statement;
|
import java.sql.Statement;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
public abstract class HikariConnectionFactory extends AbstractConnectionFactory {
|
public abstract class HikariConnectionFactory extends AbstractConnectionFactory {
|
||||||
|
|
||||||
@ -75,7 +74,7 @@ public abstract class HikariConnectionFactory extends AbstractConnectionFactory
|
|||||||
@Override
|
@Override
|
||||||
public void init() {
|
public void init() {
|
||||||
HikariConfig config = new HikariConfig();
|
HikariConfig config = new HikariConfig();
|
||||||
config.setPoolName("luckperms");
|
config.setPoolName("luckperms-hikari");
|
||||||
|
|
||||||
appendConfigurationInfo(config);
|
appendConfigurationInfo(config);
|
||||||
appendProperties(config, this.configuration);
|
appendProperties(config, this.configuration);
|
||||||
@ -85,9 +84,6 @@ public abstract class HikariConnectionFactory extends AbstractConnectionFactory
|
|||||||
config.setMaxLifetime(this.configuration.getMaxLifetime());
|
config.setMaxLifetime(this.configuration.getMaxLifetime());
|
||||||
config.setConnectionTimeout(this.configuration.getConnectionTimeout());
|
config.setConnectionTimeout(this.configuration.getConnectionTimeout());
|
||||||
|
|
||||||
// If a connection is not returned within 10 seconds, it's probably safe to assume it's been leaked.
|
|
||||||
config.setLeakDetectionThreshold(TimeUnit.SECONDS.toMillis(10)); // 10000
|
|
||||||
|
|
||||||
// don't perform any initial connection validation - we subsequently call #getConnection
|
// don't perform any initial connection validation - we subsequently call #getConnection
|
||||||
// to setup the schema anyways
|
// to setup the schema anyways
|
||||||
config.setInitializationFailTimeout(-1);
|
config.setInitializationFailTimeout(-1);
|
||||||
|
Loading…
Reference in New Issue
Block a user