aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer
diff options
context:
space:
mode:
authorDiva Canto2013-07-17 12:57:34 -0700
committerDiva Canto2013-07-17 12:57:34 -0700
commitf4317dc26d670c853d0ea64b401b00f718f09474 (patch)
treee60be7c15efbdcd9e79dc11742186d6164ce6367 /OpenSim/Framework/Servers/HttpServer
parentDidn't mean to commit this change in BlockingQueue.cs (diff)
downloadopensim-SC_OLD-f4317dc26d670c853d0ea64b401b00f718f09474.zip
opensim-SC_OLD-f4317dc26d670c853d0ea64b401b00f718f09474.tar.gz
opensim-SC_OLD-f4317dc26d670c853d0ea64b401b00f718f09474.tar.bz2
opensim-SC_OLD-f4317dc26d670c853d0ea64b401b00f718f09474.tar.xz
Putting the requests back in the queue while testing for count >0 is not the smartest move...
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer')
-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 4cb551c..c50df5a 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
@@ -126,18 +126,22 @@ namespace OpenSim.Framework.Servers.HttpServer
126 Thread.Sleep(1000); 126 Thread.Sleep(1000);
127 Watchdog.UpdateThread(); 127 Watchdog.UpdateThread();
128 128
129 PollServiceHttpRequest req; 129 List<PollServiceHttpRequest> not_ready = new List<PollServiceHttpRequest>();
130 lock (m_longPollRequests) 130 lock (m_longPollRequests)
131 { 131 {
132 while (m_longPollRequests.Count > 0 && m_running) 132 while (m_longPollRequests.Count > 0 && m_running)
133 { 133 {
134 req = m_longPollRequests.Dequeue(); 134 PollServiceHttpRequest req = m_longPollRequests.Dequeue();
135 if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id) || // there are events in this EQ 135 if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id) || // there are events in this EQ
136 (Environment.TickCount - req.RequestTime) > req.PollServiceArgs.TimeOutms) // no events, but timeout 136 (Environment.TickCount - req.RequestTime) > req.PollServiceArgs.TimeOutms) // no events, but timeout
137 m_requests.Enqueue(req); 137 m_requests.Enqueue(req);
138 else 138 else
139 m_longPollRequests.Enqueue(req); 139 not_ready.Add(req);
140 } 140 }
141
142 foreach (PollServiceHttpRequest req in not_ready)
143 m_longPollRequests.Enqueue(req);
144
141 } 145 }
142 } 146 }
143 } 147 }