mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 19:36:07 +08:00
Force a sim exit when hearbeat isn't restarting successfully
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user