Core/Networking: Fixed authserver socket read handlers being called on incorrect thread

This commit is contained in:
Shauren
2020-07-28 19:44:38 +02:00
parent 5cd93df9ee
commit 3ad05386c8
2 changed files with 2 additions and 2 deletions

View File

@@ -74,8 +74,6 @@ bool WorldSocketMgr::StartWorldNetwork(Trinity::Asio::IoContext& ioContext, std:
if (!BaseSocketMgr::StartNetwork(ioContext, bindIp, port, threadCount))
return false;
_acceptor->SetSocketFactory(std::bind(&BaseSocketMgr::GetSocketForAccept, this));
_acceptor->AsyncAcceptWithCallback<&OnSocketAccept>();
sScriptMgr->OnNetworkStart();

View File

@@ -66,6 +66,8 @@ public:
for (int32 i = 0; i < _threadCount; ++i)
_threads[i].Start();
_acceptor->SetSocketFactory([this]() { return GetSocketForAccept(); });
return true;
}