mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-24 11:38:40 +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");
|
||||
|
||||
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