mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-22 07:37:28 -04:00
Core/DBLayer
- Store threadbundlemask internally per database pool and prevent direct access to config file post startup - Fix threadbundlemask flag checking for ReactorRunnable, WorldRunnable - Remove CLI threadbundlemask flag, CLI doesn´t need a seperate mysql connection nor thread - Remove unused Character Database connection from WorldSocketMgr / ReactorRunnable - Add proper LoginDatabase connection to RA Runnable (soon to be overhauled) Note: still experimental and not tested for live use --HG-- branch : trunk
This commit is contained in:
@@ -159,18 +159,12 @@ class ReactorRunnable : protected ACE_Task_Base
|
||||
sLog.outStaticDebug ("Network Thread Starting");
|
||||
|
||||
bool needInit = true;
|
||||
if (!(sWorld.getIntConfig(CONFIG_MYSQL_BUNDLE_LOGINDB) & MYSQL_BUNDLE_RA))
|
||||
if (!(LoginDatabase.GetBundleMask() & MYSQL_BUNDLE_RAR))
|
||||
{
|
||||
LoginDatabase.Init_MySQL_Connection();
|
||||
needInit = false;
|
||||
}
|
||||
|
||||
if (!(sWorld.getIntConfig(CONFIG_MYSQL_BUNDLE_CHARDB) & MYSQL_BUNDLE_RA))
|
||||
{
|
||||
CharacterDatabase.Init_MySQL_Connection();
|
||||
needInit = false;
|
||||
}
|
||||
|
||||
if (needInit)
|
||||
MySQL::Thread_Init();
|
||||
|
||||
@@ -210,10 +204,8 @@ class ReactorRunnable : protected ACE_Task_Base
|
||||
}
|
||||
|
||||
///- Free MySQL thread resources and deallocate lingering connections
|
||||
if (!(sWorld.getIntConfig(CONFIG_MYSQL_BUNDLE_LOGINDB) & MYSQL_BUNDLE_RA))
|
||||
if (!(LoginDatabase.GetBundleMask() & MYSQL_BUNDLE_RAR))
|
||||
LoginDatabase.End_MySQL_Connection();
|
||||
if (!(sWorld.getIntConfig(CONFIG_MYSQL_BUNDLE_CHARDB) & MYSQL_BUNDLE_RA))
|
||||
CharacterDatabase.End_MySQL_Connection();
|
||||
|
||||
if (needInit)
|
||||
MySQL::Thread_End();
|
||||
|
||||
Reference in New Issue
Block a user