mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-12-28 20:17:55 +01:00
Fix compat with older hikari versions (#600)
This commit is contained in:
parent
0bec93ab1c
commit
a765be0a6f
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user