mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 13:55:35 +08:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user