diff options
-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); |