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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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