Skip to content

Commit

Permalink
fix(Core/Network): fix high idle cpu load in NetworkThread (azerothco…
Browse files Browse the repository at this point in the history
  • Loading branch information
sudlud authored Dec 23, 2024
1 parent 9c01bbb commit 2472654
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/shared/Network/NetworkThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class NetworkThread
{
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();

Expand All @@ -193,7 +193,7 @@ class NetworkThread
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();
Expand Down

0 comments on commit 2472654

Please sign in to comment.