mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
Make the DNS cache timeout configurable.
In containerized environments, DNS is simulated. It can change several times per second as containers move around. The hardcoded timeout was too long for a container environment.
This commit is contained in:
@@ -85,8 +85,6 @@ namespace OpenSim.Server
|
||||
ServicePointManager.UseNagleAlgorithm = false;
|
||||
ServicePointManager.ServerCertificateValidationCallback = ValidateServerCertificate;
|
||||
|
||||
try { ServicePointManager.DnsRefreshTimeout = 300000; } catch { }
|
||||
|
||||
m_Server = new HttpServerBase("R.O.B.U.S.T.", args);
|
||||
|
||||
string registryLocation;
|
||||
@@ -98,6 +96,9 @@ namespace OpenSim.Server
|
||||
throw new Exception("Configuration error");
|
||||
}
|
||||
|
||||
int dnsTimeout = serverConfig.GetInt("DnsTimeout", 30000);
|
||||
try { ServicePointManager.DnsRefreshTimeout = dnsTimeout; } catch { }
|
||||
|
||||
m_NoVerifyCertChain = serverConfig.GetBoolean("NoVerifyCertChain", m_NoVerifyCertChain);
|
||||
m_NoVerifyCertHostname = serverConfig.GetBoolean("NoVerifyCertHostname", m_NoVerifyCertHostname);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user