diff options
Diffstat (limited to 'OpenSim/Server/ServerMain.cs')
-rw-r--r-- | OpenSim/Server/ServerMain.cs | 17 |
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; | |||
29 | using log4net; | 29 | using log4net; |
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | using System; | 31 | using System; |
32 | using System.Net; | ||
32 | using System.Collections.Generic; | 33 | using System.Collections.Generic; |
34 | using OpenSim.Framework; | ||
33 | using OpenSim.Framework.Servers; | 35 | using OpenSim.Framework.Servers; |
34 | using OpenSim.Framework.Servers.HttpServer; | 36 | using OpenSim.Framework.Servers.HttpServer; |
35 | using OpenSim.Server.Base; | 37 | using 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; |