aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/ServerMain.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server/ServerMain.cs')
-rw-r--r--OpenSim/Server/ServerMain.cs17
1 files changed, 15 insertions, 2 deletions
diff --git a/OpenSim/Server/ServerMain.cs b/OpenSim/Server/ServerMain.cs
index 65e9287..69d0b74 100644
--- a/OpenSim/Server/ServerMain.cs
+++ b/OpenSim/Server/ServerMain.cs
@@ -29,7 +29,9 @@ using Nini.Config;
29using log4net; 29using log4net;
30using System.Reflection; 30using System.Reflection;
31using System; 31using System;
32using System.Net;
32using System.Collections.Generic; 33using System.Collections.Generic;
34using OpenSim.Framework;
33using OpenSim.Framework.Servers; 35using OpenSim.Framework.Servers;
34using OpenSim.Framework.Servers.HttpServer; 36using OpenSim.Framework.Servers.HttpServer;
35using OpenSim.Server.Base; 37using OpenSim.Server.Base;
@@ -53,8 +55,14 @@ namespace OpenSim.Server
53 55
54 public static int Main(string[] args) 56 public static int Main(string[] args)
55 { 57 {
58 ServicePointManager.DefaultConnectionLimit = 64;
59 ServicePointManager.Expect100Continue = false;
60 ServicePointManager.UseNagleAlgorithm = false;
61
62 try { ServicePointManager.DnsRefreshTimeout = 300000; } catch { }
63
56 m_Server = new HttpServerBase("R.O.B.U.S.T.", args); 64 m_Server = new HttpServerBase("R.O.B.U.S.T.", args);
57 65
58 string registryLocation; 66 string registryLocation;
59 67
60 IConfig serverConfig = m_Server.Config.Configs["Startup"]; 68 IConfig serverConfig = m_Server.Config.Configs["Startup"];
@@ -65,7 +73,7 @@ namespace OpenSim.Server
65 } 73 }
66 74
67 string connList = serverConfig.GetString("ServiceConnectors", String.Empty); 75 string connList = serverConfig.GetString("ServiceConnectors", String.Empty);
68 76
69 registryLocation = serverConfig.GetString("RegistryLocation","."); 77 registryLocation = serverConfig.GetString("RegistryLocation",".");
70 78
71 IConfig servicesConfig = m_Server.Config.Configs["ServiceList"]; 79 IConfig servicesConfig = m_Server.Config.Configs["ServiceList"];
@@ -153,6 +161,11 @@ namespace OpenSim.Server
153 161
154 int res = m_Server.Run(); 162 int res = m_Server.Run();
155 163
164 if(m_Server != null)
165 m_Server.Shutdown();
166
167 Util.StopThreadPool();
168
156 Environment.Exit(res); 169 Environment.Exit(res);
157 170
158 return 0; 171 return 0;