Delay the enqueueing of non-longpoll requests for 100ms. No need to have these requests actively on the processing queue if it seems they're not ready.

TeleportWork
Diva Canto 2013-07-18 17:17:20 -07:00
parent 63c42d6602
commit 98d47ea428
1 changed files with 11 additions and 1 deletions

View File

@ -96,7 +96,17 @@ namespace OpenSim.Framework.Servers.HttpServer
private void ReQueueEvent(PollServiceHttpRequest req)
{
if (m_running)
m_requests.Enqueue(req);
{
// delay the enqueueing for 100ms. There's no need to have the event
// actively on the queue
Timer t = new Timer(self => {
((Timer)self).Dispose();
m_requests.Enqueue(req);
});
t.Change(100, Timeout.Infinite);
}
}
public void Enqueue(PollServiceHttpRequest req)