Changed how TextureDownloadModule is initialised, due to some weird behaviour from the module loaded which was resulting in a lot of unused TextureDownloadModule objects being created (and each starting up a thread).
parent
40fd37f95a
commit
baea4b793d
|
@ -54,19 +54,25 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
|
|
||||||
public TextureDownloadModule()
|
public TextureDownloadModule()
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
|
{
|
||||||
|
if (m_scene == null)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Creating Texture download module");
|
||||||
m_thread = new Thread(new ThreadStart(ProcessTextureSenders));
|
m_thread = new Thread(new ThreadStart(ProcessTextureSenders));
|
||||||
m_thread.IsBackground = true;
|
m_thread.IsBackground = true;
|
||||||
m_thread.Start();
|
m_thread.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
|
||||||
{
|
|
||||||
if (!m_scenes.Contains(scene))
|
if (!m_scenes.Contains(scene))
|
||||||
{
|
{
|
||||||
m_scenes.Add(scene);
|
m_scenes.Add(scene);
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
m_scene.EventManager.OnNewClient += NewClient;
|
m_scene.EventManager.OnNewClient += NewClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
|
@ -272,7 +278,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendPacket()
|
private void SendPacket()
|
||||||
{
|
{
|
||||||
if (PacketCounter <= NumPackets)
|
if (PacketCounter <= NumPackets)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue