aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs76
1 files changed, 56 insertions, 20 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index dd01780..dd50073 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -581,6 +581,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
581 581
582 private void CloseCleanup(bool shutdownCircuit) 582 private void CloseCleanup(bool shutdownCircuit)
583 { 583 {
584
585
584 m_scene.RemoveClient(AgentId); 586 m_scene.RemoveClient(AgentId);
585 587
586 //m_log.InfoFormat("[CLIENTVIEW] Memory pre GC {0}", System.GC.GetTotalMemory(false)); 588 //m_log.InfoFormat("[CLIENTVIEW] Memory pre GC {0}", System.GC.GetTotalMemory(false));
@@ -592,12 +594,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
592 594
593 Thread.Sleep(2000); 595 Thread.Sleep(2000);
594 596
595 // Shut down timers 597 // Shut down timers. Thread Context of this method is murky. Lock all timers
596 if (m_clientPingTimer.Enabled) m_clientPingTimer.Stop(); 598 if (m_clientPingTimer.Enabled)
597 if (m_avatarTerseUpdateTimer.Enabled) m_avatarTerseUpdateTimer.Stop(); 599 lock (m_clientPingTimer)
598 if (m_primTerseUpdateTimer.Enabled) m_primTerseUpdateTimer.Stop(); 600 m_clientPingTimer.Stop();
599 if (m_primFullUpdateTimer.Enabled) m_primFullUpdateTimer.Stop(); 601 if (m_avatarTerseUpdateTimer.Enabled)
600 if (m_textureRequestTimer.Enabled) m_textureRequestTimer.Stop(); 602 lock (m_avatarTerseUpdateTimer)
603 m_avatarTerseUpdateTimer.Stop();
604 if (m_primTerseUpdateTimer.Enabled)
605 lock (m_primTerseUpdateTimer)
606 m_primTerseUpdateTimer.Stop();
607 if (m_primFullUpdateTimer.Enabled)
608 lock (m_primFullUpdateTimer)
609 m_primFullUpdateTimer.Stop();
610 if (m_textureRequestTimer.Enabled)
611 lock (m_textureRequestTimer)
612 m_textureRequestTimer.Stop();
601 613
602 // This is just to give the client a reasonable chance of 614 // This is just to give the client a reasonable chance of
603 // flushing out all it's packets. There should probably 615 // flushing out all it's packets. There should probably
@@ -676,12 +688,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP
676 688
677 public void Stop() 689 public void Stop()
678 { 690 {
679 // Shut down timers 691 // Shut down timers. Thread Context is Murky, lock all timers!
680 if (m_clientPingTimer.Enabled) m_clientPingTimer.Stop(); 692 if (m_clientPingTimer.Enabled)
681 if (m_avatarTerseUpdateTimer.Enabled) m_avatarTerseUpdateTimer.Stop(); 693 lock (m_clientPingTimer)
682 if (m_primTerseUpdateTimer.Enabled) m_primTerseUpdateTimer.Stop(); 694 m_clientPingTimer.Stop();
683 if (m_primFullUpdateTimer.Enabled) m_primFullUpdateTimer.Stop(); 695
684 if (m_textureRequestTimer.Enabled) m_textureRequestTimer.Stop(); 696 if (m_avatarTerseUpdateTimer.Enabled)
697 lock (m_avatarTerseUpdateTimer)
698 m_avatarTerseUpdateTimer.Stop();
699
700 if (m_primTerseUpdateTimer.Enabled)
701 lock (m_primTerseUpdateTimer)
702 m_primTerseUpdateTimer.Stop();
703
704 if (m_primFullUpdateTimer.Enabled)
705 lock (m_primFullUpdateTimer)
706 m_primFullUpdateTimer.Stop();
707
708 if (m_textureRequestTimer.Enabled)
709 lock (m_textureRequestTimer)
710 m_textureRequestTimer.Stop();
685 } 711 }
686 712
687 public void Restart() 713 public void Restart()
@@ -2907,7 +2933,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2907 } 2933 }
2908 else if (m_avatarTerseUpdates.Count == 1) 2934 else if (m_avatarTerseUpdates.Count == 1)
2909 { 2935 {
2910 m_avatarTerseUpdateTimer.Start(); 2936 lock (m_avatarTerseUpdateTimer)
2937 m_avatarTerseUpdateTimer.Start();
2911 } 2938 }
2912 } 2939 }
2913 } 2940 }
@@ -2957,7 +2984,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2957 OutPacket(terse, ThrottleOutPacketType.Task); 2984 OutPacket(terse, ThrottleOutPacketType.Task);
2958 2985
2959 if (m_avatarTerseUpdates.Count == 0) 2986 if (m_avatarTerseUpdates.Count == 0)
2960 m_avatarTerseUpdateTimer.Stop(); 2987 {
2988 lock (m_avatarTerseUpdateTimer)
2989 m_avatarTerseUpdateTimer.Stop();
2990 }
2961 } 2991 }
2962 } 2992 }
2963 2993
@@ -3138,7 +3168,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3138 if (m_imageManager.ProcessImageQueue(m_textureSendLimit, 3168 if (m_imageManager.ProcessImageQueue(m_textureSendLimit,
3139 m_textureDataLimit)) 3169 m_textureDataLimit))
3140 { 3170 {
3141 m_textureRequestTimer.Start(); 3171 lock(m_textureRequestTimer)
3172 m_textureRequestTimer.Start();
3142 } 3173 }
3143 } 3174 }
3144 } 3175 }
@@ -3149,7 +3180,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3149 { 3180 {
3150 if (m_primFullUpdates.Count == 0 && m_primFullUpdateTimer.Enabled) 3181 if (m_primFullUpdates.Count == 0 && m_primFullUpdateTimer.Enabled)
3151 { 3182 {
3152 m_primFullUpdateTimer.Stop(); 3183 lock (m_primFullUpdateTimer)
3184 m_primFullUpdateTimer.Stop();
3153 3185
3154 return; 3186 return;
3155 } 3187 }
@@ -3196,7 +3228,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3196 OutPacket(outPacket, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority); 3228 OutPacket(outPacket, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority);
3197 3229
3198 if (m_primFullUpdates.Count == 0 && m_primFullUpdateTimer.Enabled) 3230 if (m_primFullUpdates.Count == 0 && m_primFullUpdateTimer.Enabled)
3199 m_primFullUpdateTimer.Stop(); 3231 lock (m_primFullUpdateTimer)
3232 m_primFullUpdateTimer.Stop();
3200 } 3233 }
3201 } 3234 }
3202 3235
@@ -3234,7 +3267,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3234 { 3267 {
3235 if (m_primTerseUpdates.Count == 0) 3268 if (m_primTerseUpdates.Count == 0)
3236 { 3269 {
3237 m_primTerseUpdateTimer.Stop(); 3270 lock (m_primTerseUpdateTimer)
3271 m_primTerseUpdateTimer.Stop();
3238 3272
3239 return; 3273 return;
3240 } 3274 }
@@ -3284,7 +3318,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3284 OutPacket(outPacket, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority); 3318 OutPacket(outPacket, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority);
3285 3319
3286 if (m_primTerseUpdates.Count == 0) 3320 if (m_primTerseUpdates.Count == 0)
3287 m_primTerseUpdateTimer.Stop(); 3321 lock (m_primTerseUpdateTimer)
3322 m_primTerseUpdateTimer.Stop();
3288 } 3323 }
3289 } 3324 }
3290 3325
@@ -6586,7 +6621,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6586 if (m_imageManager != null) 6621 if (m_imageManager != null)
6587 { 6622 {
6588 m_imageManager.EnqueueReq(args); 6623 m_imageManager.EnqueueReq(args);
6589 m_textureRequestTimer.Start(); 6624 lock (m_textureRequestTimer)
6625 m_textureRequestTimer.Start();
6590 } 6626 }
6591 } 6627 }
6592 } 6628 }