From c9b7ec2af91792b9d6558875c2a44267ac0ac5a0 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 9 Aug 2019 12:06:33 +0100 Subject: 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. --- OpenSim/Server/ServerMain.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'OpenSim/Server/ServerMain.cs') 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 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); -- cgit v1.1