aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
diff options
context:
space:
mode:
authorlbsa712008-01-03 14:01:53 +0000
committerlbsa712008-01-03 14:01:53 +0000
commit7b062cefa22a5b67e124e478345751bab7a18093 (patch)
tree0b862bdb288d7afe513c3985f233c2b65861c9c6 /OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
parentSet svn:eol-style. (diff)
downloadopensim-SC_OLD-7b062cefa22a5b67e124e478345751bab7a18093.zip
opensim-SC_OLD-7b062cefa22a5b67e124e478345751bab7a18093.tar.gz
opensim-SC_OLD-7b062cefa22a5b67e124e478345751bab7a18093.tar.bz2
opensim-SC_OLD-7b062cefa22a5b67e124e478345751bab7a18093.tar.xz
* Added removal of TextureSenders and UserTextureDownloadService on agent leaving region.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/TextureDownloadModule.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/TextureDownloadModule.cs18
1 files changed, 17 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
index 4e96572..6ebf47f 100644
--- a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Region.Environment.Modules
49 49
50 private readonly BlockingQueue<TextureSender> m_queueSenders = new BlockingQueue<TextureSender>(); 50 private readonly BlockingQueue<TextureSender> m_queueSenders = new BlockingQueue<TextureSender>();
51 51
52 private Dictionary<LLUUID, UserTextureDownloadService> m_userTextureServices = 52 private readonly Dictionary<LLUUID, UserTextureDownloadService> m_userTextureServices =
53 new Dictionary<LLUUID, UserTextureDownloadService>(); 53 new Dictionary<LLUUID, UserTextureDownloadService>();
54 54
55 private Thread m_thread; 55 private Thread m_thread;
@@ -73,6 +73,22 @@ namespace OpenSim.Region.Environment.Modules
73 m_scenes.Add(scene); 73 m_scenes.Add(scene);
74 m_scene = scene; 74 m_scene = scene;
75 m_scene.EventManager.OnNewClient += NewClient; 75 m_scene.EventManager.OnNewClient += NewClient;
76 m_scene.EventManager.OnRemovePresence += EventManager_OnRemovePresence;
77 }
78 }
79
80 private void EventManager_OnRemovePresence(LLUUID agentId)
81 {
82 UserTextureDownloadService textureService;
83
84 lock (m_userTextureServices)
85 {
86 if( m_userTextureServices.TryGetValue( agentId, out textureService ))
87 {
88 textureService.Close();
89
90 m_userTextureServices.Remove(agentId);
91 }
76 } 92 }
77 } 93 }
78 94