mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 03:06:05 +08:00
On startup, start scenes after we're set up all local scenes, rather than starting scenes before others have been created.
This aims to avoid a race condition where scenes could look to inform neighbours that they were up before those neighbours had been created. http://opensimulator.org/mantis/view.php?id=6618
This commit is contained in:
@@ -425,9 +425,6 @@ namespace OpenSim
|
||||
|
||||
mscene = scene;
|
||||
|
||||
scene.Start();
|
||||
scene.StartScripts();
|
||||
|
||||
return clientServers;
|
||||
}
|
||||
|
||||
@@ -751,6 +748,7 @@ namespace OpenSim
|
||||
ShutdownClientServer(whichRegion);
|
||||
IScene scene;
|
||||
CreateRegion(whichRegion, true, out scene);
|
||||
scene.Start();
|
||||
}
|
||||
|
||||
# region Setup methods
|
||||
|
||||
@@ -389,10 +389,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (value)
|
||||
{
|
||||
if (!m_active)
|
||||
Start();
|
||||
Start(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// This appears assymetric with Start() above but is not - setting m_active = false stops the loops
|
||||
// XXX: Possibly this should be in an explicit Stop() method for symmetry.
|
||||
m_active = false;
|
||||
}
|
||||
}
|
||||
@@ -1331,10 +1333,18 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
public override void Start()
|
||||
{
|
||||
Start(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start the scene
|
||||
/// </summary>
|
||||
public void Start()
|
||||
/// <param name='startScripts'>
|
||||
/// Start the scripts within the scene.
|
||||
/// </param>
|
||||
public void Start(bool startScripts)
|
||||
{
|
||||
m_active = true;
|
||||
|
||||
@@ -1353,6 +1363,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
m_heartbeatThread
|
||||
= Watchdog.StartThread(
|
||||
Heartbeat, string.Format("Heartbeat ({0})", RegionInfo.RegionName), ThreadPriority.Normal, false, false);
|
||||
|
||||
StartScripts();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -561,6 +561,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public virtual void Start()
|
||||
{
|
||||
}
|
||||
|
||||
public void Restart()
|
||||
{
|
||||
// This has to be here to fire the event
|
||||
|
||||
Reference in New Issue
Block a user