Add auto handling of IPv6 only server depends on network type
This commit is contained in:
parent
d2f2c6cf1f
commit
9928cf726f
@ -231,6 +231,11 @@ void ConnectToServer::asynchronousUpdate()
|
||||
}
|
||||
servers.clear();
|
||||
}
|
||||
// Always use IPv6 connection for IPv6 only server
|
||||
if (m_server->getAddress().isUnset() &&
|
||||
NetworkConfig::get()->getIPType() != NetworkConfig::IP_V4)
|
||||
m_server->setIPV6Connection(true);
|
||||
|
||||
// Auto enable IPv6 socket in client with nat64, so in
|
||||
// connect to server it will change the ipv4 address to nat64 one
|
||||
if (m_server->useIPV6Connection() ||
|
||||
|
@ -320,7 +320,14 @@ void ServersManager::setWanServers(bool success, const XMLNode* input)
|
||||
Log::verbose("ServersManager", "Skipping a server");
|
||||
continue;
|
||||
}
|
||||
m_servers.emplace_back(std::make_shared<Server>(*s));
|
||||
std::shared_ptr<Server> ser = std::make_shared<Server>(*s);
|
||||
if (ser->getAddress().isUnset() &&
|
||||
NetworkConfig::get()->getIPType() == NetworkConfig::IP_V4)
|
||||
{
|
||||
Log::verbose("ServersManager", "Skipping an IPv6 only server");
|
||||
continue;
|
||||
}
|
||||
m_servers.emplace_back(ser);
|
||||
}
|
||||
m_last_load_time.store(StkTime::getMonoTimeMs());
|
||||
m_list_updated = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user