aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/ServerMain.cs
diff options
context:
space:
mode:
authorMelanie2019-08-09 12:06:33 +0100
committerMelanie2019-08-09 12:06:33 +0100
commitc9b7ec2af91792b9d6558875c2a44267ac0ac5a0 (patch)
tree872c93bfd92f83b5e03ec35c3297ce5248410f77 /OpenSim/Server/ServerMain.cs
parentMerge branch 'master' of brain.opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC-c9b7ec2af91792b9d6558875c2a44267ac0ac5a0.zip
opensim-SC-c9b7ec2af91792b9d6558875c2a44267ac0ac5a0.tar.gz
opensim-SC-c9b7ec2af91792b9d6558875c2a44267ac0ac5a0.tar.bz2
opensim-SC-c9b7ec2af91792b9d6558875c2a44267ac0ac5a0.tar.xz
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.
Diffstat (limited to 'OpenSim/Server/ServerMain.cs')
-rw-r--r--OpenSim/Server/ServerMain.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/OpenSim/Server/ServerMain.cs b/OpenSim/Server/ServerMain.cs
index 09f6920..c180ca6 100644
--- a/OpenSim/Server/ServerMain.cs
+++ b/OpenSim/Server/ServerMain.cs
@@ -85,8 +85,6 @@ namespace OpenSim.Server
85 ServicePointManager.UseNagleAlgorithm = false; 85 ServicePointManager.UseNagleAlgorithm = false;
86 ServicePointManager.ServerCertificateValidationCallback = ValidateServerCertificate; 86 ServicePointManager.ServerCertificateValidationCallback = ValidateServerCertificate;
87 87
88 try { ServicePointManager.DnsRefreshTimeout = 300000; } catch { }
89
90 m_Server = new HttpServerBase("R.O.B.U.S.T.", args); 88 m_Server = new HttpServerBase("R.O.B.U.S.T.", args);
91 89
92 string registryLocation; 90 string registryLocation;
@@ -98,6 +96,9 @@ namespace OpenSim.Server
98 throw new Exception("Configuration error"); 96 throw new Exception("Configuration error");
99 } 97 }
100 98
99 int dnsTimeout = serverConfig.GetInt("DnsTimeout", 30000);
100 try { ServicePointManager.DnsRefreshTimeout = dnsTimeout; } catch { }
101
101 m_NoVerifyCertChain = serverConfig.GetBoolean("NoVerifyCertChain", m_NoVerifyCertChain); 102 m_NoVerifyCertChain = serverConfig.GetBoolean("NoVerifyCertChain", m_NoVerifyCertChain);
102 m_NoVerifyCertHostname = serverConfig.GetBoolean("NoVerifyCertHostname", m_NoVerifyCertHostname); 103 m_NoVerifyCertHostname = serverConfig.GetBoolean("NoVerifyCertHostname", m_NoVerifyCertHostname);
103 104