fix(Core/Network): fix high idle cpu load in NetworkThread (#21033)

This commit is contained in:
sudlud
2024-12-23 22:29:06 +01:00
committed by GitHub
parent 9c01bbbd6e
commit 24726545fb

View File

@@ -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();