* Fix opensim region server shutdown.
parent
b7baa3cd2a
commit
313a635d1e
|
@ -52,7 +52,7 @@ namespace OpenSim.Framework.Servers
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Should be overriden by descendents if they need to perform extra shutdown processing
|
/// Should be overriden by descendents if they need to perform extra shutdown processing
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual void Shutdown()
|
public virtual void Shutdown()
|
||||||
{
|
{
|
||||||
m_console.Close();
|
m_console.Close();
|
||||||
Environment.Exit(0);
|
Environment.Exit(0);
|
||||||
|
|
|
@ -178,7 +178,7 @@ namespace OpenSim.Grid.GridServer
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Shutdown()
|
public override void Shutdown()
|
||||||
{
|
{
|
||||||
foreach (IGridPlugin plugin in m_plugins) plugin.Close();
|
foreach (IGridPlugin plugin in m_plugins) plugin.Close();
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,7 @@ namespace OpenSim.Grid.MessagingServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Shutdown()
|
public override void Shutdown()
|
||||||
{
|
{
|
||||||
msgsvc.deregisterWithUserServer();
|
msgsvc.deregisterWithUserServer();
|
||||||
|
|
||||||
|
|
|
@ -244,7 +244,7 @@ namespace OpenSim.Grid.UserServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Shutdown()
|
public override void Shutdown()
|
||||||
{
|
{
|
||||||
m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation;
|
m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation;
|
||||||
|
|
||||||
|
|
|
@ -330,19 +330,13 @@ namespace OpenSim
|
||||||
// We are done with startup
|
// We are done with startup
|
||||||
m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}",
|
m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}",
|
||||||
m_clientServers.Count.ToString(), m_clientServers.Count > 1 ? "s" : "");
|
m_clientServers.Count.ToString(), m_clientServers.Count > 1 ? "s" : "");
|
||||||
|
|
||||||
WorldHasComeToAnEnd.WaitOne();
|
WorldHasComeToAnEnd.WaitOne();
|
||||||
m_log.Info("[OPENSIM MAIN]: Shutdown complete, goodbye.");
|
m_log.Info("[OPENSIM MAIN]: Shutdown complete, goodbye.");
|
||||||
|
|
||||||
Environment.Exit(0);
|
Environment.Exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Signal that the end of the world is now.
|
|
||||||
/// </summary>
|
|
||||||
public void ApocalypseNow()
|
|
||||||
{
|
|
||||||
WorldHasComeToAnEnd.Set();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Print the version information available to the library. This include a subversion number if the root
|
/// Print the version information available to the library. This include a subversion number if the root
|
||||||
/// .svn/entries file is present.
|
/// .svn/entries file is present.
|
||||||
|
@ -689,7 +683,7 @@ namespace OpenSim
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Performs any last-minute sanity checking and shuts down the region server
|
/// Performs any last-minute sanity checking and shuts down the region server
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual void InternalShutdown()
|
public override void Shutdown()
|
||||||
{
|
{
|
||||||
if (proxyUrl.Length > 0)
|
if (proxyUrl.Length > 0)
|
||||||
{
|
{
|
||||||
|
@ -703,14 +697,10 @@ namespace OpenSim
|
||||||
m_log.Info("[SHUTDOWN]: Closing console and terminating");
|
m_log.Info("[SHUTDOWN]: Closing console and terminating");
|
||||||
|
|
||||||
m_sceneManager.Close();
|
m_sceneManager.Close();
|
||||||
// needs to be called by Shutdown() method
|
|
||||||
// Environment.Exit(0);
|
WorldHasComeToAnEnd.Set();
|
||||||
}
|
|
||||||
|
base.Shutdown();
|
||||||
public virtual void Shutdown()
|
|
||||||
{
|
|
||||||
InternalShutdown();
|
|
||||||
ApocalypseNow();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -120,32 +120,6 @@ namespace OpenSim
|
||||||
return new ConsoleBase("Region", this);
|
return new ConsoleBase("Region", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Performs any last-minute sanity checking and shuts down the region server
|
|
||||||
/// </summary>
|
|
||||||
public override void Shutdown()
|
|
||||||
{
|
|
||||||
if (m_startupCommandsFile != String.Empty)
|
|
||||||
{
|
|
||||||
RunCommandScript(m_shutdownCommandsFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (proxyUrl.Length > 0)
|
|
||||||
{
|
|
||||||
Util.XmlRpcCommand(proxyUrl, "Stop");
|
|
||||||
}
|
|
||||||
|
|
||||||
m_log.Info("[SHUTDOWN]: Closing all threads");
|
|
||||||
m_log.Info("[SHUTDOWN]: Killing listener thread");
|
|
||||||
m_log.Info("[SHUTDOWN]: Killing clients");
|
|
||||||
// TODO: implement this
|
|
||||||
m_log.Info("[SHUTDOWN]: Closing console and terminating");
|
|
||||||
|
|
||||||
m_sceneManager.Close();
|
|
||||||
|
|
||||||
base.Shutdown();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void RunAutoTimerScript(object sender, EventArgs e)
|
private void RunAutoTimerScript(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (m_timedScript != "disabled")
|
if (m_timedScript != "disabled")
|
||||||
|
|
Loading…
Reference in New Issue