Correct the timeout value

This commit is contained in:
Benau 2020-09-03 13:35:46 +08:00
parent 618eb87df0
commit e072122939

View File

@ -108,6 +108,8 @@ std::shared_ptr<ServerList> ServersManager::getWANRefreshRequest() const
uint64_t timeout = StkTime::getMonoTimeMs() - m_creation_time;
if (timeout > 2000)
timeout = 0;
else
timeout = 2000 - timeout;
NetworkConfig::get()->getIPDetectionResult(timeout);
auto server_list = m_server_list.lock();
if (!server_list)