Browse Source

BETA: Adding configuration option for connection close time for login server.

Reported by: Kingzor
Zoey76 12 years ago
parent
commit
014320bdc8

+ 5 - 0
L2J_Server_BETA/dist/login/config/LoginServer.properties

@@ -92,6 +92,11 @@ MaximumDbConnections = 10
 # Default: 0
 MaximumDbIdleTime = 0
 
+# Connection close time.
+# Default: 60000
+ConnectionCloseTime = 60000
+
+
 # ---------------------------------------------------------------------------
 # Misc.
 # ---------------------------------------------------------------------------

+ 1 - 0
L2J_Server_BETA/java/com/l2jserver/Config.java

@@ -3050,6 +3050,7 @@ public final class Config
 			DATABASE_PASSWORD = ServerSettings.getProperty("Password", "");
 			DATABASE_MAX_CONNECTIONS = Integer.parseInt(ServerSettings.getProperty("MaximumDbConnections", "10"));
 			DATABASE_MAX_IDLE_TIME = Integer.parseInt(ServerSettings.getProperty("MaximumDbIdleTime", "0"));
+			CONNECTION_CLOSE_TIME = Long.parseLong(ServerSettings.getProperty("ConnectionCloseTime", "60000"));
 			
 			SHOW_LICENCE = Boolean.parseBoolean(ServerSettings.getProperty("ShowLicence", "true"));
 			

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/L2DatabaseFactory.java

@@ -274,7 +274,7 @@ public class L2DatabaseFactory
 				}
 				else
 				{
-					getExecutor().schedule(new ConnectionCloser(con, new RuntimeException()), Config.CONNECTION_CLOSE_TIME, TimeUnit.SECONDS);
+					getExecutor().schedule(new ConnectionCloser(con, new RuntimeException()), Config.CONNECTION_CLOSE_TIME, TimeUnit.MILLISECONDS);
 				}
 			}
 			catch (SQLException e)