Make connection pool init timeout configurable
This commit is contained in:
@@ -8,6 +8,7 @@ public class ServerConfig {
|
||||
public String DB_URL;
|
||||
public String DB_USER;
|
||||
public String DB_PASS;
|
||||
public int INIT_CONNECTION_POOL_TIMEOUT;
|
||||
|
||||
//Login Configuration
|
||||
public int WORLDS;
|
||||
|
||||
@@ -49,7 +49,7 @@ public class DatabaseConnection {
|
||||
* @return true if connection to the database initiated successfully, false if not successful
|
||||
*/
|
||||
public static boolean initializeConnectionPool() {
|
||||
final int timeoutSeconds = 60;
|
||||
final int timeoutSeconds = YamlConfig.config.server.INIT_CONNECTION_POOL_TIMEOUT;
|
||||
final Instant timeout = Instant.now().plusSeconds(timeoutSeconds);
|
||||
|
||||
System.out.println("Initializing connection pool...");
|
||||
|
||||
Reference in New Issue
Block a user