diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index e4c3329740..7c3b6c5029 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs @@ -84,7 +84,7 @@ namespace OpenSim ServicePointManager.DefaultConnectionLimit = 12; } - try { ServicePointManager.DnsRefreshTimeout = 300000; } catch { } + try { ServicePointManager.DnsRefreshTimeout = 5000; } catch { } ServicePointManager.Expect100Continue = false; ServicePointManager.UseNagleAlgorithm = false; diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index fcc87177a6..ee4ddf4ba8 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -37,6 +37,7 @@ using System.Runtime; using System.Text; using System.Text.RegularExpressions; using System.Timers; +using System.Net; using log4net; using NDesk.Options; using Nini.Config; @@ -119,6 +120,9 @@ namespace OpenSim stpMinThreads = startupConfig.GetInt("MinPoolThreads", 2 ); stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 25); m_consolePrompt = startupConfig.GetString("ConsolePrompt", @"Region (\R) "); + + int dnsTimeout = startupConfig.GetInt("DnsTimeout", 30000); + try { ServicePointManager.DnsRefreshTimeout = dnsTimeout; } catch { } } if (Util.FireAndForgetMethod == FireAndForgetMethod.SmartThreadPool) diff --git a/OpenSim/Server/ServerMain.cs b/OpenSim/Server/ServerMain.cs index 09f6920df3..c180ca639a 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);