diff options
author | Melanie | 2011-11-17 19:15:11 +0100 |
---|---|---|
committer | Melanie | 2011-11-17 19:15:11 +0100 |
commit | e9c386f6a61124b14219496c9b1696b1819f93d5 (patch) | |
tree | dcbce379892d15422ef69f0352ff3974303362d5 | |
parent | Merge branch 'master' into bigmerge (diff) | |
download | opensim-SC-e9c386f6a61124b14219496c9b1696b1819f93d5.zip opensim-SC-e9c386f6a61124b14219496c9b1696b1819f93d5.tar.gz opensim-SC-e9c386f6a61124b14219496c9b1696b1819f93d5.tar.bz2 opensim-SC-e9c386f6a61124b14219496c9b1696b1819f93d5.tar.xz |
Force a sim exit when hearbeat isn't restarting successfully
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 149d2d3..876dfb2 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -215,6 +215,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
215 | private int m_lastIncoming; | 215 | private int m_lastIncoming; |
216 | private int m_lastOutgoing; | 216 | private int m_lastOutgoing; |
217 | private bool m_firstHeartbeat = true; | 217 | private bool m_firstHeartbeat = true; |
218 | private int m_hbRestarts = 0; | ||
218 | 219 | ||
219 | private object m_deleting_scene_object = new object(); | 220 | private object m_deleting_scene_object = new object(); |
220 | 221 | ||
@@ -1166,6 +1167,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1166 | //m_heartbeatTimer.Elapsed += new ElapsedEventHandler(Heartbeat); | 1167 | //m_heartbeatTimer.Elapsed += new ElapsedEventHandler(Heartbeat); |
1167 | if (HeartbeatThread != null) | 1168 | if (HeartbeatThread != null) |
1168 | { | 1169 | { |
1170 | m_hbRestarts++; | ||
1171 | if(m_hbRestarts > 10) | ||
1172 | Environment.Exit(1); | ||
1169 | m_log.ErrorFormat("[SCENE]: Restarting heartbeat thread because it hasn't reported in in region {0}", RegionInfo.RegionName); | 1173 | m_log.ErrorFormat("[SCENE]: Restarting heartbeat thread because it hasn't reported in in region {0}", RegionInfo.RegionName); |
1170 | HeartbeatThread.Abort(); | 1174 | HeartbeatThread.Abort(); |
1171 | Watchdog.AbortThread(HeartbeatThread.ManagedThreadId); | 1175 | Watchdog.AbortThread(HeartbeatThread.ManagedThreadId); |