diff options
Diffstat (limited to 'OpenSim/Framework/Servers')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs | 10 |
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 | } |