diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs index c50df5a..4cb551c 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs | |||
@@ -126,22 +126,18 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
126 | Thread.Sleep(1000); | 126 | Thread.Sleep(1000); |
127 | Watchdog.UpdateThread(); | 127 | Watchdog.UpdateThread(); |
128 | 128 | ||
129 | List<PollServiceHttpRequest> not_ready = new List<PollServiceHttpRequest>(); | 129 | PollServiceHttpRequest req; |
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 | PollServiceHttpRequest req = m_longPollRequests.Dequeue(); | 134 | 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 | not_ready.Add(req); | 139 | m_longPollRequests.Enqueue(req); |
140 | } | 140 | } |
141 | |||
142 | foreach (PollServiceHttpRequest req in not_ready) | ||
143 | m_longPollRequests.Enqueue(req); | ||
144 | |||
145 | } | 141 | } |
146 | } | 142 | } |
147 | } | 143 | } |