aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/BaseOpenSimServer.cs
diff options
context:
space:
mode:
authorDiva Canto2009-10-05 16:06:21 -0700
committerDiva Canto2009-10-05 16:06:21 -0700
commit2753f4d62c79b45f5ad1b3e275d7a9c628d34687 (patch)
tree6c4123680f293d5fd76346b2b57eb1cb714cd784 /OpenSim/Framework/Servers/BaseOpenSimServer.cs
parentMake sure that keys exist in arrays before trying to access them. (diff)
downloadopensim-SC-2753f4d62c79b45f5ad1b3e275d7a9c628d34687.zip
opensim-SC-2753f4d62c79b45f5ad1b3e275d7a9c628d34687.tar.gz
opensim-SC-2753f4d62c79b45f5ad1b3e275d7a9c628d34687.tar.bz2
opensim-SC-2753f4d62c79b45f5ad1b3e275d7a9c628d34687.tar.xz
* GridServerPostHandler.cs: Try/catch in Handle
* BaseOpenSimServer.cs: Added thread pool numbers in show threads
Diffstat (limited to 'OpenSim/Framework/Servers/BaseOpenSimServer.cs')
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 632b551..56155dd 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -238,7 +238,7 @@ namespace OpenSim.Framework.Servers
238 List<Thread> threads = ThreadTracker.GetThreads(); 238 List<Thread> threads = ThreadTracker.GetThreads();
239 if (threads == null) 239 if (threads == null)
240 { 240 {
241 sb.Append("Thread tracking is only enabled in DEBUG mode."); 241 sb.Append("OpenSim thread tracking is only enabled in DEBUG mode.");
242 } 242 }
243 else 243 else
244 { 244 {
@@ -264,6 +264,12 @@ namespace OpenSim.Framework.Servers
264 } 264 }
265 } 265 }
266 } 266 }
267 int workers = 0, ports = 0, maxWorkers = 0, maxPorts = 0;
268 ThreadPool.GetAvailableThreads(out workers, out ports);
269 ThreadPool.GetMaxThreads(out maxWorkers, out maxPorts);
270
271 sb.Append(Environment.NewLine + "*** ThreadPool threads ***" + Environment.NewLine);
272 sb.Append("workers: " + (maxWorkers - workers) + " (" + maxWorkers + "); ports: " + (maxPorts - ports) + " (" + maxPorts + ")" + Environment.NewLine);
267 273
268 return sb.ToString(); 274 return sb.ToString();
269 } 275 }