aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Util.cs8
-rw-r--r--OpenSim/Region/Application/Application.cs3
-rw-r--r--OpenSim/Server/ServerMain.cs3
3 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index a3c7750..f52a84c 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -991,7 +991,7 @@ namespace OpenSim.Framework
991 return output.ToString(); 991 return output.ToString();
992 } 992 }
993 993
994 static ExpiringCache<string,IPAddress> dnscache = new ExpiringCache<string, IPAddress>(); 994 private static ExpiringCache<string,IPAddress> dnscache = new ExpiringCache<string, IPAddress>();
995 995
996 /// <summary> 996 /// <summary>
997 /// Converts a URL to a IPAddress 997 /// Converts a URL to a IPAddress
@@ -1015,7 +1015,10 @@ namespace OpenSim.Framework
1015 1015
1016 IPAddress ia = null; 1016 IPAddress ia = null;
1017 if(dnscache.TryGetValue(dnsAddress, out ia) && ia != null) 1017 if(dnscache.TryGetValue(dnsAddress, out ia) && ia != null)
1018 {
1019 dnscache.AddOrUpdate(dnsAddress, ia, 300);
1018 return ia; 1020 return ia;
1021 }
1019 1022
1020 ia = null; 1023 ia = null;
1021 // If it is already an IP, don't let GetHostEntry see it 1024 // If it is already an IP, don't let GetHostEntry see it
@@ -1081,7 +1084,10 @@ namespace OpenSim.Framework
1081 1084
1082 IPAddress ia = null; 1085 IPAddress ia = null;
1083 if(dnscache.TryGetValue(hostname, out ia) && ia != null) 1086 if(dnscache.TryGetValue(hostname, out ia) && ia != null)
1087 {
1088 dnscache.AddOrUpdate(hostname, ia, 300);
1084 return getEndPoint(ia, port); 1089 return getEndPoint(ia, port);
1090 }
1085 1091
1086 ia = null; 1092 ia = null;
1087 1093
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs
index 447afb4..66ce8e5 100644
--- a/OpenSim/Region/Application/Application.cs
+++ b/OpenSim/Region/Application/Application.cs
@@ -79,10 +79,9 @@ namespace OpenSim
79 else 79 else
80 { 80 {
81 ServicePointManager.DefaultConnectionLimit = 12; 81 ServicePointManager.DefaultConnectionLimit = 12;
82 try { ServicePointManager.DnsRefreshTimeout = 120000; } // just is case some crazy mono decides to have it infinity
83 catch { }
84 } 82 }
85 83
84 try { ServicePointManager.DnsRefreshTimeout = 300000; } catch { }
86 ServicePointManager.Expect100Continue = false; 85 ServicePointManager.Expect100Continue = false;
87 ServicePointManager.UseNagleAlgorithm = false; 86 ServicePointManager.UseNagleAlgorithm = false;
88 87
diff --git a/OpenSim/Server/ServerMain.cs b/OpenSim/Server/ServerMain.cs
index accf938..69d0b74 100644
--- a/OpenSim/Server/ServerMain.cs
+++ b/OpenSim/Server/ServerMain.cs
@@ -59,8 +59,7 @@ namespace OpenSim.Server
59 ServicePointManager.Expect100Continue = false; 59 ServicePointManager.Expect100Continue = false;
60 ServicePointManager.UseNagleAlgorithm = false; 60 ServicePointManager.UseNagleAlgorithm = false;
61 61
62 try { ServicePointManager.DnsRefreshTimeout = 120000; } // just is case some mono decides to have it infinity 62 try { ServicePointManager.DnsRefreshTimeout = 300000; } catch { }
63 catch { }
64 63
65 m_Server = new HttpServerBase("R.O.B.U.S.T.", args); 64 m_Server = new HttpServerBase("R.O.B.U.S.T.", args);
66 65