mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +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");
|
||||
|
||||
_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(); });
|
||||
_ioContext.run();
|
||||
|
||||
@@ -193,7 +193,7 @@ protected:
|
||||
if (_stopped)
|
||||
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(); });
|
||||
|
||||
AddNewSockets();
|
||||
|
||||
Reference in New Issue
Block a user