aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorDiva Canto2013-07-18 17:17:20 -0700
committerDiva Canto2013-07-21 08:57:16 -0700
commit98d47ea428cd31b302e33dc6015a889d38bcb267 (patch)
tree5c40354d68f3fe019330c5cd23acd5f994a77a45 /OpenSim/Framework
parentDo some simple queue empty checks in the main outgoing udp loop instead of al... (diff)
downloadopensim-SC-98d47ea428cd31b302e33dc6015a889d38bcb267.zip
opensim-SC-98d47ea428cd31b302e33dc6015a889d38bcb267.tar.gz
opensim-SC-98d47ea428cd31b302e33dc6015a889d38bcb267.tar.bz2
opensim-SC-98d47ea428cd31b302e33dc6015a889d38bcb267.tar.xz
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.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
index e811079..727dbe5 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
@@ -96,7 +96,17 @@ namespace OpenSim.Framework.Servers.HttpServer
96 private void ReQueueEvent(PollServiceHttpRequest req) 96 private void ReQueueEvent(PollServiceHttpRequest req)
97 { 97 {
98 if (m_running) 98 if (m_running)
99 m_requests.Enqueue(req); 99 {
100 // delay the enqueueing for 100ms. There's no need to have the event
101 // actively on the queue
102 Timer t = new Timer(self => {
103 ((Timer)self).Dispose();
104 m_requests.Enqueue(req);
105 });
106
107 t.Change(100, Timeout.Infinite);
108
109 }
100 } 110 }
101 111
102 public void Enqueue(PollServiceHttpRequest req) 112 public void Enqueue(PollServiceHttpRequest req)