Removed pointless delays when shutting down.

This commit is contained in:
MobiusDevelopment 2019-07-30 16:11:11 +00:00
parent 7abbfd2791
commit 01e927f857
3 changed files with 3 additions and 39 deletions

View File

@ -45,7 +45,8 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import org.l2jmobius.gameserver.thread.LoginServerThread;
/**
* This class provides the functions for shutting down and restarting the server It closes all open client connections and saves all data.
* This class provides the functions for shutting down and restarting the server.<br>
* It closes all open client connections and saves all data.
* @version $Revision: 1.2.4.6 $ $Date: 2009/05/12 19:45:09 $
*/
public class Shutdown extends Thread
@ -371,11 +372,6 @@ public class Shutdown extends Thread
DatabaseBackup.performBackup();
}
System.runFinalization();
System.gc();
LOGGER.info("Memory cleanup, recycled unused objects.");
LOGGER.info("[STATUS] Server shutdown successfully.");
if (_instance._shutdownMode == GM_RESTART)
@ -432,36 +428,12 @@ public class Shutdown extends Thread
LOGGER.warning("Error saving offline shops. " + t);
}
try
{
wait(1000);
}
catch (InterruptedException e1)
{
}
// Disconnect all the players from the server
disconnectAllCharacters();
try
{
wait(5000);
}
catch (InterruptedException e1)
{
}
// Save players data!
saveAllPlayers();
try
{
wait(10000);
}
catch (InterruptedException e1)
{
}
// Seven Signs data is now saved along with Festival data.
if (!SevenSigns.getInstance().isSealValidationPeriod())
{
@ -525,7 +497,7 @@ public class Shutdown extends Thread
try
{
wait(5000);
Thread.sleep(5000);
}
catch (InterruptedException e)
{

View File

@ -174,13 +174,6 @@ public class LoginController
public void shutdown()
{
_stopNow = true;
try
{
Thread.sleep(10000);
}
catch (Exception e)
{
}
}
private void generateBlowFishKeys()

View File

@ -203,7 +203,6 @@ public class LoginServer
}
LoginController.getInstance().shutdown();
System.gc();
Runtime.getRuntime().exit(restart ? 2 : 0);
}