From b7d596a6af51bea7dba642cdc768ac5ff77af5f3 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 28 Nov 2007 06:18:07 +0000 Subject: * Restaring the sim works fine in grid mode now. Sims announce themselves to their neighbors when they start up. Neighbors get this message and tell their agents that there's a new sim up. * Certain unrecoverable physics based crashes in ODE are now hooked up to the 'restart the sim' routine. --- OpenSim/Region/Environment/Scenes/Scene.cs | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index bdafce8..1359bd2 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -232,6 +232,15 @@ namespace OpenSim.Region.Environment.Scenes m_permissionManager.Initialise(this); m_innerScene = new InnerScene(this, m_regInfo, m_permissionManager); + + // If the Inner scene has an Unrecoverable error, restart this sim. + // Currently the only thing that causes it to happen is two kinds of specific + // Physics based crashes. + // + // Out of memory + // Operating system has killed the plugin + m_innerScene.UnRecoverableError += restartNOW; + m_sceneXmlLoader = new SceneXmlLoader(this, m_innerScene, m_regInfo); RegisterDefaultSceneEvents(); @@ -315,13 +324,17 @@ namespace OpenSim.Region.Environment.Scenes { t_restartTimer.Stop(); t_restartTimer.AutoReset = false; - MainLog.Instance.Error("REGION", "Closing"); - Close(); - MainLog.Instance.Error("REGION", "Firing Region Restart Message"); - base.Restart(0); + restartNOW(); } } + public void restartNOW() + { + MainLog.Instance.Error("REGION", "Closing"); + Close(); + MainLog.Instance.Error("REGION", "Firing Region Restart Message"); + base.Restart(0); + } public void restart_Notify_Wait_Elapsed(object sender, ElapsedEventArgs e) { m_restartWaitTimer.Stop(); -- cgit v1.1