diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/TextureDownloadModule.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/TextureDownloadModule.cs | 18 |
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 | ||