diff options
Merge commit '9ec672c70b28b8c1d6d81bab7744fcf7bf9b83c7' into bigmerge
Diffstat (limited to 'OpenSim/Framework/Servers')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index a6bdc2d..33dec8d 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -1838,9 +1838,9 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1838 | { | 1838 | { |
1839 | lock (m_pollHandlers) | 1839 | lock (m_pollHandlers) |
1840 | { | 1840 | { |
1841 | if (m_pollHandlers.ContainsKey(httpMethod)) | 1841 | if (m_pollHandlers.ContainsKey(path)) |
1842 | { | 1842 | { |
1843 | m_pollHandlers.Remove(httpMethod); | 1843 | m_pollHandlers.Remove(path); |
1844 | } | 1844 | } |
1845 | } | 1845 | } |
1846 | 1846 | ||
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 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Threading; | 30 | using System.Threading; |
31 | using System.Reflection; | ||
32 | using log4net; | ||
31 | using HttpServer; | 33 | using HttpServer; |
32 | 34 | ||
33 | namespace OpenSim.Framework.Servers.HttpServer | 35 | namespace 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 | { |