Revert "Putting the requests back in the queue while testing for count >0 is not the smartest move..."
This reverts commit f4317dc26d
.
TeleportWork
parent
5495df7443
commit
7127891957
|
@ -126,22 +126,18 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
Thread.Sleep(1000);
|
Thread.Sleep(1000);
|
||||||
Watchdog.UpdateThread();
|
Watchdog.UpdateThread();
|
||||||
|
|
||||||
List<PollServiceHttpRequest> not_ready = new List<PollServiceHttpRequest>();
|
PollServiceHttpRequest req;
|
||||||
lock (m_longPollRequests)
|
lock (m_longPollRequests)
|
||||||
{
|
{
|
||||||
while (m_longPollRequests.Count > 0 && m_running)
|
while (m_longPollRequests.Count > 0 && m_running)
|
||||||
{
|
{
|
||||||
PollServiceHttpRequest req = m_longPollRequests.Dequeue();
|
req = m_longPollRequests.Dequeue();
|
||||||
if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id) || // there are events in this EQ
|
if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id) || // there are events in this EQ
|
||||||
(Environment.TickCount - req.RequestTime) > req.PollServiceArgs.TimeOutms) // no events, but timeout
|
(Environment.TickCount - req.RequestTime) > req.PollServiceArgs.TimeOutms) // no events, but timeout
|
||||||
m_requests.Enqueue(req);
|
m_requests.Enqueue(req);
|
||||||
else
|
else
|
||||||
not_ready.Add(req);
|
m_longPollRequests.Enqueue(req);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (PollServiceHttpRequest req in not_ready)
|
|
||||||
m_longPollRequests.Enqueue(req);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue