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).

afrisby
MW 2007-12-10 15:36:33 +00:00
parent 40fd37f95a
commit baea4b793d
1 changed files with 10 additions and 4 deletions

View File

@ -54,19 +54,25 @@ namespace OpenSim.Region.Environment.Modules
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.IsBackground = true;
m_thread.Start();
}
public void Initialise(Scene scene, IConfigSource config)
{
if (!m_scenes.Contains(scene))
{
m_scenes.Add(scene);
m_scene = scene;
m_scene.EventManager.OnNewClient += NewClient;
}
}
public void PostInitialise()
@ -272,7 +278,7 @@ namespace OpenSim.Region.Environment.Modules
return false;
}
public void SendPacket()
private void SendPacket()
{
if (PacketCounter <= NumPackets)
{