mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Core/Network: Change SocketMgr.StartNetwork to take the thread count by arg instead of config
AuthSocketMgr doesn't need "Network.Threads" config Fixes "Missing name Network.Threads in config file authserver.conf" Ref #16859
This commit is contained in:
@@ -221,7 +221,15 @@ extern int main(int argc, char** argv)
|
||||
uint16 worldPort = uint16(sWorld->getIntConfig(CONFIG_PORT_WORLD));
|
||||
std::string worldListener = sConfigMgr->GetStringDefault("BindIP", "0.0.0.0");
|
||||
|
||||
sWorldSocketMgr.StartNetwork(_ioService, worldListener, worldPort);
|
||||
int networkThreads = sConfigMgr->GetIntDefault("Network.Threads", 1);
|
||||
|
||||
if (networkThreads <= 0)
|
||||
{
|
||||
TC_LOG_ERROR("server.worldserver", "Network.Threads cannot be less than 0");
|
||||
return false;
|
||||
}
|
||||
|
||||
sWorldSocketMgr.StartNetwork(_ioService, worldListener, worldPort, networkThreads);
|
||||
|
||||
// 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);
|
||||
|
||||
Reference in New Issue
Block a user