Improve sim health reporting. Output error message if heartbeat thread is restarted by scene. This may help to find out why this recovery mechanism isn't working.

avinationmerge
Melanie Thielker 2010-09-01 14:08:52 +02:00
parent aca10cb027
commit 2232e6f273
1 changed files with 2 additions and 1 deletions

View File

@ -1160,6 +1160,7 @@ namespace OpenSim.Region.Framework.Scenes
//m_heartbeatTimer.Elapsed += new ElapsedEventHandler(Heartbeat);
if (HeartbeatThread != null)
{
m_log.ErrorFormat("[SCENE]: Restarting heartbeat thread because it hasn't reported in in region {0}", RegionInfo.RegionName);
HeartbeatThread.Abort();
HeartbeatThread = null;
}
@ -4555,7 +4556,7 @@ namespace OpenSim.Region.Framework.Scenes
//
int health=1; // Start at 1, means we're up
if ((Util.EnvironmentTickCountSubtract(m_lastUpdate)) < 1000)
if (m_firstHeartbeat || ((Util.EnvironmentTickCountSubtract(m_lastUpdate)) < 1000))
health+=1;
else
return health;