mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
This commit is contained in:
@@ -1850,8 +1850,8 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
m_httpListener2.Start(64);
|
||||
|
||||
// Long Poll Service Manager with 3 worker threads a 25 second timeout for no events
|
||||
// m_PollServiceManager = new PollServiceRequestManager(this, 3, 25000);
|
||||
m_PollServiceManager = new PollServiceRequestManager(this, 4, 25000);
|
||||
m_PollServiceManager.Start();
|
||||
HTTPDRunning = true;
|
||||
|
||||
//HttpListenerContext context;
|
||||
@@ -1904,7 +1904,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
HTTPDRunning = false;
|
||||
try
|
||||
{
|
||||
// m_PollServiceManager.Stop();
|
||||
m_PollServiceManager.Stop();
|
||||
|
||||
m_httpListener2.ExceptionThrown -= httpServerException;
|
||||
//m_httpListener2.DisconnectHandler = null;
|
||||
|
||||
@@ -203,14 +203,17 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
m_server = pSrv;
|
||||
m_WorkerThreadCount = pWorkerThreadCount;
|
||||
m_workerThreads = new Thread[m_WorkerThreadCount];
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
//startup worker threads
|
||||
for (uint i = 0; i < m_WorkerThreadCount; i++)
|
||||
{
|
||||
m_workerThreads[i]
|
||||
= Watchdog.StartThread(
|
||||
PoolWorkerJob,
|
||||
String.Format("PollServiceWorkerThread{0}", i),
|
||||
string.Format("PollServiceWorkerThread{0}:{1}", i, m_server.Port),
|
||||
ThreadPriority.Normal,
|
||||
false,
|
||||
false,
|
||||
@@ -220,7 +223,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
|
||||
m_retrysThread = Watchdog.StartThread(
|
||||
this.CheckRetries,
|
||||
"PollServiceWatcherThread",
|
||||
string.Format("PollServiceWatcherThread:{0}", m_server.Port),
|
||||
ThreadPriority.Normal,
|
||||
false,
|
||||
true,
|
||||
@@ -228,7 +231,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
1000 * 60 * 10);
|
||||
}
|
||||
|
||||
|
||||
private void ReQueueEvent(PollServiceHttpRequest req)
|
||||
{
|
||||
if (m_running)
|
||||
@@ -279,14 +281,14 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
}
|
||||
}
|
||||
|
||||
~PollServiceRequestManager()
|
||||
public void Stop()
|
||||
{
|
||||
m_running = false;
|
||||
// m_timeout = -10000; // cause all to expire
|
||||
Thread.Sleep(1000); // let the world move
|
||||
|
||||
foreach (Thread t in m_workerThreads)
|
||||
Watchdog.AbortThread(t.ManagedThreadId);
|
||||
Watchdog.AbortThread(t.ManagedThreadId);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user