mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
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.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user