trying to fix rare timer related exception.

arthursv
dr scofield (aka dirk husemann) 2009-08-04 17:24:32 +02:00
parent 9f5b0c1fd9
commit 4ffc284a36
1 changed files with 12 additions and 12 deletions

View File

@ -592,11 +592,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
Thread.Sleep(2000); Thread.Sleep(2000);
// Shut down timers // Shut down timers
m_clientPingTimer.Stop(); if (m_clientPingTimer.Enabled) m_clientPingTimer.Stop();
m_avatarTerseUpdateTimer.Stop(); if (m_avatarTerseUpdateTimer.Enabled) m_avatarTerseUpdateTimer.Stop();
m_primTerseUpdateTimer.Stop(); if (m_primTerseUpdateTimer.Enabled) m_primTerseUpdateTimer.Stop();
m_primFullUpdateTimer.Stop(); if (m_primFullUpdateTimer.Enabled) m_primFullUpdateTimer.Stop();
m_textureRequestTimer.Stop(); if (m_textureRequestTimer.Enabled) m_textureRequestTimer.Stop();
// This is just to give the client a reasonable chance of // This is just to give the client a reasonable chance of
// flushing out all it's packets. There should probably // flushing out all it's packets. There should probably
@ -676,11 +676,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void Stop() public void Stop()
{ {
// Shut down timers // Shut down timers
m_clientPingTimer.Stop(); if (m_clientPingTimer.Enabled) m_clientPingTimer.Stop();
m_avatarTerseUpdateTimer.Stop(); if (m_avatarTerseUpdateTimer.Enabled) m_avatarTerseUpdateTimer.Stop();
m_primTerseUpdateTimer.Stop(); if (m_primTerseUpdateTimer.Enabled) m_primTerseUpdateTimer.Stop();
m_primFullUpdateTimer.Stop(); if (m_primFullUpdateTimer.Enabled) m_primFullUpdateTimer.Stop();
m_textureRequestTimer.Stop(); if (m_textureRequestTimer.Enabled) m_textureRequestTimer.Stop();
} }
public void Restart() public void Restart()
@ -3111,7 +3111,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
lock (m_primFullUpdates) lock (m_primFullUpdates)
{ {
if (m_primFullUpdates.Count == 0) if (m_primFullUpdates.Count == 0 && m_primFullUpdateTimer.Enabled)
{ {
m_primFullUpdateTimer.Stop(); m_primFullUpdateTimer.Stop();
@ -3159,7 +3159,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
outPacket.Header.Zerocoded = true; outPacket.Header.Zerocoded = true;
OutPacket(outPacket, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority); OutPacket(outPacket, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority);
if (m_primFullUpdates.Count == 0) if (m_primFullUpdates.Count == 0 && m_primFullUpdateTimer.Enabled)
m_primFullUpdateTimer.Stop(); m_primFullUpdateTimer.Stop();
} }
} }