aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-10-24 23:16:03 +0100
committerJustin Clark-Casey (justincc)2011-10-24 23:16:03 +0100
commit9ec672c70b28b8c1d6d81bab7744fcf7bf9b83c7 (patch)
tree6a91df6f558370682a0a3c0f7c9a59ff85302d3e /OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
parentseparate out future common setup code from EventQueueTests.AddForClient() (diff)
downloadopensim-SC-9ec672c70b28b8c1d6d81bab7744fcf7bf9b83c7.zip
opensim-SC-9ec672c70b28b8c1d6d81bab7744fcf7bf9b83c7.tar.gz
opensim-SC-9ec672c70b28b8c1d6d81bab7744fcf7bf9b83c7.tar.bz2
opensim-SC-9ec672c70b28b8c1d6d81bab7744fcf7bf9b83c7.tar.xz
Fix bugs in EventQueueGetModule.ClientClosed() and BaseHttpServer.RemovePollServerHTTPHandler() that stopped existing code in ClientClosed() from actually tearing down the poll handler
Actually doing the tear down appear to have no ill effects with region crossing and teleport.
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs10
1 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
index e7a64f7..0840a9d 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
@@ -28,12 +28,16 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Threading; 30using System.Threading;
31using System.Reflection;
32using log4net;
31using HttpServer; 33using HttpServer;
32 34
33namespace OpenSim.Framework.Servers.HttpServer 35namespace OpenSim.Framework.Servers.HttpServer
34{ 36{
35 public class PollServiceRequestManager 37 public class PollServiceRequestManager
36 { 38 {
39// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
40
37 private readonly BaseHttpServer m_server; 41 private readonly BaseHttpServer m_server;
38 private static Queue m_requests = Queue.Synchronized(new Queue()); 42 private static Queue m_requests = Queue.Synchronized(new Queue());
39 private uint m_WorkerThreadCount = 0; 43 private uint m_WorkerThreadCount = 0;
@@ -42,8 +46,6 @@ namespace OpenSim.Framework.Servers.HttpServer
42 private Thread m_watcherThread; 46 private Thread m_watcherThread;
43 private bool m_running = true; 47 private bool m_running = true;
44 48
45
46
47 public PollServiceRequestManager(BaseHttpServer pSrv, uint pWorkerThreadCount, int pTimeout) 49 public PollServiceRequestManager(BaseHttpServer pSrv, uint pWorkerThreadCount, int pTimeout)
48 { 50 {
49 m_server = pSrv; 51 m_server = pSrv;
@@ -61,7 +63,6 @@ namespace OpenSim.Framework.Servers.HttpServer
61 m_workerThreads[i].Name = String.Format("PollServiceWorkerThread{0}",i); 63 m_workerThreads[i].Name = String.Format("PollServiceWorkerThread{0}",i);
62 //Can't add to thread Tracker here Referencing OpenSim.Framework creates circular reference 64 //Can't add to thread Tracker here Referencing OpenSim.Framework creates circular reference
63 m_workerThreads[i].Start(); 65 m_workerThreads[i].Start();
64
65 } 66 }
66 67
67 //start watcher threads 68 //start watcher threads
@@ -98,7 +99,10 @@ namespace OpenSim.Framework.Servers.HttpServer
98 if (m_requests.Count == 0) 99 if (m_requests.Count == 0)
99 return; 100 return;
100 101
102// m_log.DebugFormat("[POLL SERVICE REQUEST MANAGER]: Processing {0} requests", m_requests.Count);
103
101 int reqperthread = (int) (m_requests.Count/m_WorkerThreadCount) + 1; 104 int reqperthread = (int) (m_requests.Count/m_WorkerThreadCount) + 1;
105
102 // For Each WorkerThread 106 // For Each WorkerThread
103 for (int tc = 0; tc < m_WorkerThreadCount && m_requests.Count > 0; tc++) 107 for (int tc = 0; tc < m_WorkerThreadCount && m_requests.Count > 0; tc++)
104 { 108 {