aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer
diff options
context:
space:
mode:
authorMelanie2012-06-29 22:11:49 +0100
committerMelanie2012-06-29 22:11:49 +0100
commit05cf51cbbdb3f33bb4c532eefc24eb0a194ed378 (patch)
tree5514845e589587a84a621bb6e576136d4869ad29 /OpenSim/Framework/Servers/HttpServer
parentRevert "Mantis 5977 Corrections to llRegionSayTo" (diff)
parentFix llRegionSayTo the right way (diff)
downloadopensim-SC-05cf51cbbdb3f33bb4c532eefc24eb0a194ed378.zip
opensim-SC-05cf51cbbdb3f33bb4c532eefc24eb0a194ed378.tar.gz
opensim-SC-05cf51cbbdb3f33bb4c532eefc24eb0a194ed378.tar.bz2
opensim-SC-05cf51cbbdb3f33bb4c532eefc24eb0a194ed378.tar.xz
Merge branch 'avination' into careminster
Conflicts: OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs7
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs13
2 files changed, 15 insertions, 5 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
index 3252251..5bc85ff 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
@@ -41,6 +41,7 @@ namespace OpenSim.Framework.Servers.HttpServer
41 41
42 private readonly BaseHttpServer m_server; 42 private readonly BaseHttpServer m_server;
43 private static Queue m_requests = Queue.Synchronized(new Queue()); 43 private static Queue m_requests = Queue.Synchronized(new Queue());
44 private static ManualResetEvent m_ev = new ManualResetEvent(false);
44 private uint m_WorkerThreadCount = 0; 45 private uint m_WorkerThreadCount = 0;
45 private Thread[] m_workerThreads; 46 private Thread[] m_workerThreads;
46 private PollServiceWorkerThread[] m_PollServiceWorkerThreads; 47 private PollServiceWorkerThread[] m_PollServiceWorkerThreads;
@@ -90,15 +91,17 @@ namespace OpenSim.Framework.Servers.HttpServer
90 { 91 {
91 lock (m_requests) 92 lock (m_requests)
92 m_requests.Enqueue(req); 93 m_requests.Enqueue(req);
94 m_ev.Set();
93 } 95 }
94 96
95 public void ThreadStart() 97 public void ThreadStart()
96 { 98 {
97 while (m_running) 99 while (m_running)
98 { 100 {
101 m_ev.WaitOne(1000);
102 m_ev.Reset();
99 Watchdog.UpdateThread(); 103 Watchdog.UpdateThread();
100 ProcessQueuedRequests(); 104 ProcessQueuedRequests();
101 Thread.Sleep(1000);
102 } 105 }
103 } 106 }
104 107
@@ -154,4 +157,4 @@ namespace OpenSim.Framework.Servers.HttpServer
154 m_running = false; 157 m_running = false;
155 } 158 }
156 } 159 }
157} \ No newline at end of file 160}
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
index 35a8dee..d305782 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
@@ -89,8 +89,15 @@ namespace OpenSim.Framework.Servers.HttpServer
89 continue; 89 continue;
90 } 90 }
91 91
92 Hashtable responsedata = req.PollServiceArgs.GetEvents(req.RequestID, req.PollServiceArgs.Id, str.ReadToEnd()); 92 try
93 DoHTTPGruntWork(m_server, req, responsedata); 93 {
94 Hashtable responsedata = req.PollServiceArgs.GetEvents(req.RequestID, req.PollServiceArgs.Id, str.ReadToEnd());
95 DoHTTPGruntWork(m_server, req, responsedata);
96 }
97 catch (ObjectDisposedException) // Browser aborted before we could read body, server closed the stream
98 {
99 // Ignore it, no need to reply
100 }
94 } 101 }
95 else 102 else
96 { 103 {
@@ -161,4 +168,4 @@ namespace OpenSim.Framework.Servers.HttpServer
161 } 168 }
162 } 169 }
163 } 170 }
164} \ No newline at end of file 171}