diff options
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs index 06745f9..6f87c85 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs | |||
@@ -174,7 +174,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
174 | private readonly BaseHttpServer m_server; | 174 | private readonly BaseHttpServer m_server; |
175 | 175 | ||
176 | private BlockingQueue<PollServiceHttpRequest> m_requests = new BlockingQueue<PollServiceHttpRequest>(); | 176 | private BlockingQueue<PollServiceHttpRequest> m_requests = new BlockingQueue<PollServiceHttpRequest>(); |
177 | private BlockingQueue<PollServiceHttpRequest> m_slowRequests = new BlockingQueue<PollServiceHttpRequest>(); | 177 | private static Queue<PollServiceHttpRequest> m_slowRequests = new Queue<PollServiceHttpRequest>(); |
178 | private static Queue<PollServiceHttpRequest> m_retryRequests = new Queue<PollServiceHttpRequest>(); | 178 | private static Queue<PollServiceHttpRequest> m_retryRequests = new Queue<PollServiceHttpRequest>(); |
179 | 179 | ||
180 | private uint m_WorkerThreadCount = 0; | 180 | private uint m_WorkerThreadCount = 0; |
@@ -229,9 +229,14 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
229 | if (m_running) | 229 | if (m_running) |
230 | { | 230 | { |
231 | if (req.PollServiceArgs.Type == PollServiceEventArgs.EventType.LslHttp) | 231 | if (req.PollServiceArgs.Type == PollServiceEventArgs.EventType.LslHttp) |
232 | { | ||
232 | m_requests.Enqueue(req); | 233 | m_requests.Enqueue(req); |
234 | } | ||
233 | else | 235 | else |
234 | m_slowRequests.Enqueue(req); | 236 | { |
237 | lock (m_slowRequests) | ||
238 | m_slowRequests.Enqueue(req); | ||
239 | } | ||
235 | } | 240 | } |
236 | } | 241 | } |
237 | 242 | ||
@@ -251,8 +256,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
251 | { | 256 | { |
252 | slowCount = 0; | 257 | slowCount = 0; |
253 | 258 | ||
254 | while (m_slowRequests.Count() > 0 && m_running) | 259 | lock (m_slowRequests) |
255 | m_requests.Enqueue(m_slowRequests.Dequeue()); | 260 | { |
261 | while (m_slowRequests.Count > 0 && m_running) | ||
262 | m_requests.Enqueue(m_slowRequests.Dequeue()); | ||
263 | } | ||
256 | } | 264 | } |
257 | } | 265 | } |
258 | } | 266 | } |
@@ -290,6 +298,12 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
290 | PollServiceHttpRequest wreq; | 298 | PollServiceHttpRequest wreq; |
291 | m_retryRequests.Clear(); | 299 | m_retryRequests.Clear(); |
292 | 300 | ||
301 | lock (m_slowRequests) | ||
302 | { | ||
303 | while (m_slowRequests.Count > 0 && m_running) | ||
304 | m_requests.Enqueue(m_slowRequests.Dequeue()); | ||
305 | } | ||
306 | |||
293 | while (m_requests.Count() > 0) | 307 | while (m_requests.Count() > 0) |
294 | { | 308 | { |
295 | try | 309 | try |