Core/Console: start CliRunnable thread after all log messages have been printed.

Port From (https://github.com/TrinityCore/TrinityCore/commit/2344671af5dfd15db980b81b5c433d50c718970f)
This commit is contained in:
hondacrx
2021-12-16 12:39:12 -05:00
parent 85359b129f
commit 9ba51bd120
+7 -7
View File
@@ -95,13 +95,6 @@ namespace WorldServer
Global.WorldMgr.GetRealm().PopulationLevel = 0.0f;
Global.WorldMgr.GetRealm().Flags = Global.WorldMgr.GetRealm().Flags & ~RealmFlags.VersionMismatch;
//- Launch CliRunnable thread
if (ConfigMgr.GetDefaultValue("Console.Enable", true))
{
Thread commandThread = new(CommandManager.InitConsole);
commandThread.Start();
}
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();
@@ -109,6 +102,13 @@ namespace WorldServer
uint startupDuration = Time.GetMSTimeDiffToNow(startupBegin);
Log.outInfo(LogFilter.Server, "World initialized in {0} minutes {1} seconds", (startupDuration / 60000), ((startupDuration % 60000) / 1000));
//- Launch CliRunnable thread
if (ConfigMgr.GetDefaultValue("Console.Enable", true))
{
Thread commandThread = new(CommandManager.InitConsole);
commandThread.Start();
}
WorldUpdateLoop();
try