mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-01 01:53:47 +00:00
feat(Core/Network): Add Proxy Protocol v2 support. (#18839)
* feat(Core/Network): Add Proxy Protocol v2 support. * Fix codestyle and build. * Another codestyle fix. * One more missing include.
This commit is contained in:
committed by
GitHub
parent
715b290cb7
commit
9815025341
@@ -114,5 +114,13 @@ void WorldSocketMgr::OnSocketOpen(tcp::socket&& sock, uint32 threadIndex)
|
||||
|
||||
NetworkThread<WorldSocket>* WorldSocketMgr::CreateThreads() const
|
||||
{
|
||||
return new WorldSocketThread[GetNetworkThreadCount()];
|
||||
|
||||
NetworkThread<WorldSocket>* threads = new WorldSocketThread[GetNetworkThreadCount()];
|
||||
|
||||
bool proxyProtocolEnabled = sConfigMgr->GetOption<bool>("Network.EnableProxyProtocol", false, true);
|
||||
if (proxyProtocolEnabled)
|
||||
for (int i = 0; i < GetNetworkThreadCount(); i++)
|
||||
threads[i].EnableProxyProtocol();
|
||||
|
||||
return threads;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user