mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-06 19:09:31 +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.
|
// The drivers are really old in some of the older Spigot binaries, so Connection#isValid doesn't work.
|
||||||
config.setConnectionTestQuery("/* LuckPerms ping */ SELECT 1");
|
config.setConnectionTestQuery("/* LuckPerms ping */ SELECT 1");
|
||||||
|
|
||||||
|
try {
|
||||||
// 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);
|
||||||
|
} catch (NoSuchMethodError e) {
|
||||||
|
//noinspection deprecation
|
||||||
|
config.setInitializationFailFast(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
hikari = new HikariDataSource(config);
|
hikari = new HikariDataSource(config);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user