Addendum to last commit. With the last commit, some other code that should

have been in this commit slipped in. If the last heartbeat is more than
2 seconds ago, kill that thread and start a new one. Untested.
his commit adds support to let the first heartbeat complete unconditionally,
since it is almost always longer.
remotes/origin/0.6.7-post-fixes
Melanie 2009-09-06 16:14:45 +01:00
parent 67d9a6bcc1
commit 998624544c
1 changed files with 5 additions and 0 deletions

View File

@ -225,6 +225,7 @@ namespace OpenSim.Region.Framework.Scenes
private int m_lastUpdate = Environment.TickCount;
private int m_maxPrimsPerFrame = 200;
private bool m_firstHeartbeat = true;
private object m_deleting_scene_object = new object();
@ -924,6 +925,7 @@ namespace OpenSim.Region.Framework.Scenes
Update();
m_lastUpdate = Environment.TickCount;
m_firstHeartbeat = false;
}
catch (ThreadAbortException)
{
@ -4580,6 +4582,9 @@ namespace OpenSim.Region.Framework.Scenes
private void CheckHeartbeat()
{
if (m_firstHeartbeat)
return;
if (System.Environment.TickCount - m_lastUpdate > 2000)
StartTimer();
}