diff options
author | Wyrserth <43747507+Wyrserth@users.noreply.github.com> | 2019-05-26 23:01:50 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2019-05-26 23:01:50 +0200 |
commit | d8ce37e0c90a3da2d42a09d33523e4403aab2723 (patch) | |
tree | 8449d75e0c3ac2582b29dd043fc9541306cc9990 /src/server/worldserver/Main.cpp | |
parent | a70845c93de0902c4c6fa55ff10293f7e3679ac5 (diff) |
Core/Console: start CliRunnable thread after all log messages have been printed. (#23321)
Diffstat (limited to 'src/server/worldserver/Main.cpp')
-rw-r--r-- | src/server/worldserver/Main.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp index 335b553a018..e163dd2566d 100644 --- a/src/server/worldserver/Main.cpp +++ b/src/server/worldserver/Main.cpp @@ -307,17 +307,6 @@ extern int main(int argc, char** argv) ClearOnlineAccounts(); }); - // Launch CliRunnable thread - std::shared_ptr<std::thread> cliThread; -#ifdef _WIN32 - if (sConfigMgr->GetBoolDefault("Console.Enable", true) && (m_ServiceStatus == -1)/* need disable console in service mode*/) -#else - if (sConfigMgr->GetBoolDefault("Console.Enable", true)) -#endif - { - cliThread.reset(new std::thread(CliThread), &ShutdownCLIThread); - } - // Set server online (allow connecting now) LoginDatabase.DirectPExecute("UPDATE realmlist SET flag = flag & ~%u, population = 0 WHERE id = '%u'", REALM_FLAG_OFFLINE, realm.Id.Realm); realm.PopulationLevel = 0.0f; @@ -336,6 +325,17 @@ extern int main(int argc, char** argv) sScriptMgr->OnStartup(); + // Launch CliRunnable thread + std::shared_ptr<std::thread> cliThread; +#ifdef _WIN32 + if (sConfigMgr->GetBoolDefault("Console.Enable", true) && (m_ServiceStatus == -1)/* need disable console in service mode*/) +#else + if (sConfigMgr->GetBoolDefault("Console.Enable", true)) +#endif + { + cliThread.reset(new std::thread(CliThread), &ShutdownCLIThread); + } + WorldUpdateLoop(); // Shutdown starts here |