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:
DDuarte authored and Aokromes committed 2016-05-12 08:22:27 +02:00
1 parent 6cc4cc362d
commit 4e4cbad69f
5 files changed
+17 -15

No files matched your search

+2 -2
View File
@@ -53,7 +53,7 @@ WorldSocketMgr& WorldSocketMgr::Instance()
return instance;
}
bool WorldSocketMgr::StartNetwork(boost::asio::io_service& service, std::string const& bindIp, uint16 port)
bool WorldSocketMgr::StartNetwork(boost::asio::io_service& service, std::string const& bindIp, uint16 port, int threadCount)
{
_tcpNoDelay = sConfigMgr->GetBoolDefault("Network.TcpNodelay", true);
@@ -71,7 +71,7 @@ bool WorldSocketMgr::StartNetwork(boost::asio::io_service& service, std::string
return false;
}
BaseSocketMgr::StartNetwork(service, bindIp, port);
BaseSocketMgr::StartNetwork(service, bindIp, port, threadCount);
_acceptor->SetSocketFactory(std::bind(&BaseSocketMgr::GetSocketForAccept, this));