From 998624544c5120676e3048990ef74956210be959 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 6 Sep 2009 16:14:45 +0100 Subject: 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. --- OpenSim/Region/Framework/Scenes/Scene.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 8cd77f8..8f3ba97 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -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(); } -- cgit v1.1