mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Prevent a null ref when an avatar login doesn't go as planned
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user