aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorMelanie2009-09-06 16:14:45 +0100
committerMelanie2009-09-06 16:14:45 +0100
commit998624544c5120676e3048990ef74956210be959 (patch)
tree31540cf3e8847018a31fac13195ce07ebc124d4d /OpenSim/Region/Framework
parentMerge branch 'master' of ssh://melanie@opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-998624544c5120676e3048990ef74956210be959.zip
opensim-SC_OLD-998624544c5120676e3048990ef74956210be959.tar.gz
opensim-SC_OLD-998624544c5120676e3048990ef74956210be959.tar.bz2
opensim-SC_OLD-998624544c5120676e3048990ef74956210be959.tar.xz
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.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs5
1 files changed, 5 insertions, 0 deletions
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
225 225
226 private int m_lastUpdate = Environment.TickCount; 226 private int m_lastUpdate = Environment.TickCount;
227 private int m_maxPrimsPerFrame = 200; 227 private int m_maxPrimsPerFrame = 200;
228 private bool m_firstHeartbeat = true;
228 229
229 private object m_deleting_scene_object = new object(); 230 private object m_deleting_scene_object = new object();
230 231
@@ -924,6 +925,7 @@ namespace OpenSim.Region.Framework.Scenes
924 Update(); 925 Update();
925 926
926 m_lastUpdate = Environment.TickCount; 927 m_lastUpdate = Environment.TickCount;
928 m_firstHeartbeat = false;
927 } 929 }
928 catch (ThreadAbortException) 930 catch (ThreadAbortException)
929 { 931 {
@@ -4580,6 +4582,9 @@ namespace OpenSim.Region.Framework.Scenes
4580 4582
4581 private void CheckHeartbeat() 4583 private void CheckHeartbeat()
4582 { 4584 {
4585 if (m_firstHeartbeat)
4586 return;
4587
4583 if (System.Environment.TickCount - m_lastUpdate > 2000) 4588 if (System.Environment.TickCount - m_lastUpdate > 2000)
4584 StartTimer(); 4589 StartTimer();
4585 } 4590 }