Prevent a null ref when an avatar login doesn't go as planned
parent
e9382c2939
commit
cf37b3b943
|
@ -127,7 +127,7 @@ namespace OpenSim.Framework
|
||||||
m_threads.Add(threadInfo.Thread.ManagedThreadId, threadInfo);
|
m_threads.Add(threadInfo.Thread.ManagedThreadId, threadInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool RemoveThread(int threadID)
|
public static bool RemoveThread(int threadID)
|
||||||
{
|
{
|
||||||
lock (m_threads)
|
lock (m_threads)
|
||||||
return m_threads.Remove(threadID);
|
return m_threads.Remove(threadID);
|
||||||
|
|
|
@ -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);
|
m_log.ErrorFormat("[SCENE]: Restarting heartbeat thread because it hasn't reported in in region {0}", RegionInfo.RegionName);
|
||||||
HeartbeatThread.Abort();
|
HeartbeatThread.Abort();
|
||||||
|
Watchdog.RemoveThread(HeartbeatThread.ManagedThreadId);
|
||||||
HeartbeatThread = null;
|
HeartbeatThread = null;
|
||||||
}
|
}
|
||||||
m_lastUpdate = Util.EnvironmentTickCount();
|
m_lastUpdate = Util.EnvironmentTickCount();
|
||||||
|
@ -4801,7 +4802,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (m_firstHeartbeat)
|
if (m_firstHeartbeat)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Util.EnvironmentTickCountSubtract(m_lastUpdate) > 2000)
|
if (Util.EnvironmentTickCountSubtract(m_lastUpdate) > 10000)
|
||||||
StartTimer();
|
StartTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
g.ScheduleFullUpdateToAvatar(m_presence);
|
g.ScheduleFullUpdateToAvatar(m_presence);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (m_partsUpdateQueue.Count > 0)
|
while (m_partsUpdateQueue.Count != null && m_partsUpdateQueue.Count > 0)
|
||||||
{
|
{
|
||||||
SceneObjectPart part = m_partsUpdateQueue.Dequeue();
|
SceneObjectPart part = m_partsUpdateQueue.Dequeue();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue