From e9c386f6a61124b14219496c9b1696b1819f93d5 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 17 Nov 2011 19:15:11 +0100 Subject: Force a sim exit when hearbeat isn't restarting successfully --- OpenSim/Region/Framework/Scenes/Scene.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') 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 private int m_lastIncoming; private int m_lastOutgoing; private bool m_firstHeartbeat = true; + private int m_hbRestarts = 0; private object m_deleting_scene_object = new object(); @@ -1166,6 +1167,9 @@ namespace OpenSim.Region.Framework.Scenes //m_heartbeatTimer.Elapsed += new ElapsedEventHandler(Heartbeat); if (HeartbeatThread != null) { + m_hbRestarts++; + if(m_hbRestarts > 10) + Environment.Exit(1); m_log.ErrorFormat("[SCENE]: Restarting heartbeat thread because it hasn't reported in in region {0}", RegionInfo.RegionName); HeartbeatThread.Abort(); Watchdog.AbortThread(HeartbeatThread.ManagedThreadId); -- cgit v1.1