Prevent a null ref when an avatar login doesn't go as planned

avinationmerge
Melanie 2010-12-22 03:25:30 +01:00
parent e9382c2939
commit cf37b3b943
3 changed files with 4 additions and 3 deletions

View File

@ -127,7 +127,7 @@ namespace OpenSim.Framework
m_threads.Add(threadInfo.Thread.ManagedThreadId, threadInfo);
}
private static bool RemoveThread(int threadID)
public static bool RemoveThread(int threadID)
{
lock (m_threads)
return m_threads.Remove(threadID);

View File

@ -1093,6 +1093,7 @@ namespace OpenSim.Region.Framework.Scenes
{
m_log.ErrorFormat("[SCENE]: Restarting heartbeat thread because it hasn't reported in in region {0}", RegionInfo.RegionName);
HeartbeatThread.Abort();
Watchdog.RemoveThread(HeartbeatThread.ManagedThreadId);
HeartbeatThread = null;
}
m_lastUpdate = Util.EnvironmentTickCount();
@ -4801,7 +4802,7 @@ namespace OpenSim.Region.Framework.Scenes
if (m_firstHeartbeat)
return;
if (Util.EnvironmentTickCountSubtract(m_lastUpdate) > 2000)
if (Util.EnvironmentTickCountSubtract(m_lastUpdate) > 10000)
StartTimer();
}

View File

@ -106,7 +106,7 @@ namespace OpenSim.Region.Framework.Scenes
g.ScheduleFullUpdateToAvatar(m_presence);
}
while (m_partsUpdateQueue.Count > 0)
while (m_partsUpdateQueue.Count != null && m_partsUpdateQueue.Count > 0)
{
SceneObjectPart part = m_partsUpdateQueue.Dequeue();