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.
parent
63c42d6602
commit
98d47ea428
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue