mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-13 20:44:05 +00:00
Fix compat with older hikari versions (#600)
This commit is contained in:
1 file changed
+9
-3
+9
-3
@@ -91,9 +91,15 @@ public abstract class HikariConnectionFactory extends AbstractConnectionFactory
|
||||
// The drivers are really old in some of the older Spigot binaries, so Connection#isValid doesn't work.
|
||||
config.setConnectionTestQuery("/* LuckPerms ping */ SELECT 1");
|
||||
|
||||
// don't perform any initial connection validation - we subsequently call #getConnection
|
||||
// to setup the schema anyways
|
||||
config.setInitializationFailTimeout(-1);
|
||||
try {
|
||||
// don't perform any initial connection validation - we subsequently call #getConnection
|
||||
// to setup the schema anyways
|
||||
config.setInitializationFailTimeout(-1);
|
||||
} catch (NoSuchMethodError e) {
|
||||
//noinspection deprecation
|
||||
config.setInitializationFailFast(false);
|
||||
}
|
||||
|
||||
|
||||
hikari = new HikariDataSource(config);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user