aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs15
1 files changed, 9 insertions, 6 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
index 6f87c85..3a14b6f 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
@@ -70,6 +70,7 @@ namespace OpenSim.Framework.Servers.HttpServer
70 ThreadPriority.Normal, 70 ThreadPriority.Normal,
71 false, 71 false,
72 true, 72 true,
73 null,
73 int.MaxValue); 74 int.MaxValue);
74 } 75 }
75 76
@@ -79,6 +80,7 @@ namespace OpenSim.Framework.Servers.HttpServer
79 ThreadPriority.Normal, 80 ThreadPriority.Normal,
80 false, 81 false,
81 true, 82 true,
83 null,
82 1000 * 60 * 10); 84 1000 * 60 * 10);
83 } 85 }
84 86
@@ -144,9 +146,8 @@ namespace OpenSim.Framework.Servers.HttpServer
144 foreach (object o in m_requests) 146 foreach (object o in m_requests)
145 { 147 {
146 PollServiceHttpRequest req = (PollServiceHttpRequest) o; 148 PollServiceHttpRequest req = (PollServiceHttpRequest) o;
147 m_server.DoHTTPGruntWork( 149 PollServiceWorkerThread.DoHTTPGruntWork(
148 req.PollServiceArgs.NoEvents(req.RequestID, req.PollServiceArgs.Id), 150 m_server, req, req.PollServiceArgs.NoEvents(req.RequestID, req.PollServiceArgs.Id));
149 new OSHttpResponse(new HttpResponse(req.HttpContext, req.Request), req.HttpContext));
150 } 151 }
151 152
152 m_requests.Clear(); 153 m_requests.Clear();
@@ -155,6 +156,7 @@ namespace OpenSim.Framework.Servers.HttpServer
155 { 156 {
156 t.Abort(); 157 t.Abort();
157 } 158 }
159
158 m_running = false; 160 m_running = false;
159 } 161 }
160 } 162 }
@@ -184,7 +186,7 @@ namespace OpenSim.Framework.Servers.HttpServer
184 private bool m_running = true; 186 private bool m_running = true;
185 private int slowCount = 0; 187 private int slowCount = 0;
186 188
187// private int m_timeout = 1000; // increase timeout 250; now use the event one 189 // private int m_timeout = 250; // increase timeout 250; now use the event one
188 190
189 public PollServiceRequestManager(BaseHttpServer pSrv, uint pWorkerThreadCount, int pTimeout) 191 public PollServiceRequestManager(BaseHttpServer pSrv, uint pWorkerThreadCount, int pTimeout)
190 { 192 {
@@ -202,6 +204,7 @@ namespace OpenSim.Framework.Servers.HttpServer
202 ThreadPriority.Normal, 204 ThreadPriority.Normal,
203 false, 205 false,
204 true, 206 true,
207 null,
205 int.MaxValue); 208 int.MaxValue);
206 } 209 }
207 210
@@ -211,6 +214,7 @@ namespace OpenSim.Framework.Servers.HttpServer
211 ThreadPriority.Normal, 214 ThreadPriority.Normal,
212 false, 215 false,
213 true, 216 true,
217 null,
214 1000 * 60 * 10); 218 1000 * 60 * 10);
215 } 219 }
216 220
@@ -368,8 +372,7 @@ namespace OpenSim.Framework.Servers.HttpServer
368 } 372 }
369 else 373 else
370 { 374 {
371// if ((Environment.TickCount - req.RequestTime) > m_timeout) 375 // if ((Environment.TickCount - req.RequestTime) > m_timeout)
372
373 if ((Environment.TickCount - req.RequestTime) > req.PollServiceArgs.TimeOutms) 376 if ((Environment.TickCount - req.RequestTime) > req.PollServiceArgs.TimeOutms)
374 { 377 {
375 m_server.DoHTTPGruntWork(req.PollServiceArgs.NoEvents(req.RequestID, req.PollServiceArgs.Id), 378 m_server.DoHTTPGruntWork(req.PollServiceArgs.NoEvents(req.RequestID, req.PollServiceArgs.Id),