mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 08:33:47 +00:00
fix(Core/Network): fix high idle cpu load in NetworkThread (#21033)
This commit is contained in:
@@ -179,7 +179,7 @@ protected:
|
|||||||
{
|
{
|
||||||
LOG_DEBUG("misc", "Network Thread Starting");
|
LOG_DEBUG("misc", "Network Thread Starting");
|
||||||
|
|
||||||
_updateTimer.expires_at(std::chrono::steady_clock::now());
|
_updateTimer.expires_at(std::chrono::steady_clock::now() + std::chrono::milliseconds(1));
|
||||||
_updateTimer.async_wait([this](boost::system::error_code const&) { Update(); });
|
_updateTimer.async_wait([this](boost::system::error_code const&) { Update(); });
|
||||||
_ioContext.run();
|
_ioContext.run();
|
||||||
|
|
||||||
@@ -193,7 +193,7 @@ protected:
|
|||||||
if (_stopped)
|
if (_stopped)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_updateTimer.expires_at(std::chrono::steady_clock::now());
|
_updateTimer.expires_at(std::chrono::steady_clock::now() + std::chrono::milliseconds(1));
|
||||||
_updateTimer.async_wait([this](boost::system::error_code const&) { Update(); });
|
_updateTimer.async_wait([this](boost::system::error_code const&) { Update(); });
|
||||||
|
|
||||||
AddNewSockets();
|
AddNewSockets();
|
||||||
|
|||||||
Reference in New Issue
Block a user