mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-26 18:47:57 +01:00
Merge pull request #191 from botskonet/master
Adding db code to help avoid stale connections
This commit is contained in:
commit
07296f14d7
@ -38,7 +38,10 @@ public class Database {
|
||||
try
|
||||
{
|
||||
System.out.println("[mcMMO] Attempting connection to MySQL...");
|
||||
conn = DriverManager.getConnection(connectionString);
|
||||
java.util.Properties conProperties = new java.util.Properties();
|
||||
conProperties.put("autoReconnect", "true");
|
||||
conProperties.put("maxReconnects", "3");
|
||||
conn = DriverManager.getConnection(connectionString, conProperties);
|
||||
isConnected = true;
|
||||
System.out.println("[mcMMO] Connection to MySQL established!");
|
||||
} catch (SQLException ex)
|
||||
|
Loading…
Reference in New Issue
Block a user