fix(Core/World): Remove artificially high minimal update intervals an… (#15422)

fix(Core/World): Remove artificially high minimal update intervals and Allow specifying minimum world updates diff in config

* Allow specifying minimum world updates diff in config
* Remove artificially high minimal update intervals

* cherry-pick commit (29a4153f00)
* cherry-pick commit (de4920de81)
* cherry-pick commit (32cef906b0)

Co-authored-by: Shauren <shauren.trinity@gmail.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
This commit is contained in:
Kitzunu
2023-04-02 20:31:50 +02:00
committed by GitHub
parent 40cce659e9
commit f80fb9b482
6 changed files with 78 additions and 22 deletions

View File

@@ -121,8 +121,8 @@ protected:
{
LOG_DEBUG("misc", "Network Thread Starting");
_updateTimer.expires_from_now(boost::posix_time::milliseconds(10));
_updateTimer.async_wait(std::bind(&NetworkThread<SocketType>::Update, this));
_updateTimer.expires_from_now(boost::posix_time::milliseconds(1));
_updateTimer.async_wait([this](boost::system::error_code const&) { Update(); });
_ioContext.run();
LOG_DEBUG("misc", "Network Thread exits");
@@ -135,8 +135,8 @@ protected:
if (_stopped)
return;
_updateTimer.expires_from_now(boost::posix_time::milliseconds(10));
_updateTimer.async_wait(std::bind(&NetworkThread<SocketType>::Update, this));
_updateTimer.expires_from_now(boost::posix_time::milliseconds(1));
_updateTimer.async_wait([this](boost::system::error_code const&) { Update(); });
AddNewSockets();