Added lock around World.Update to prevent multiple updates occuring simultaneously (it happened!)
parent
869b39c451
commit
6103e06a34
|
@ -41,6 +41,7 @@ namespace OpenSim.world
|
|||
private string m_regionName;
|
||||
private InventoryCache _inventoryCache;
|
||||
private AssetCache _assetCache;
|
||||
private int updateLock;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new World class, and a region to go with it.
|
||||
|
@ -52,6 +53,7 @@ namespace OpenSim.world
|
|||
{
|
||||
try
|
||||
{
|
||||
updateLock = 0;
|
||||
m_clientThreads = clientThreads;
|
||||
m_regionHandle = regionHandle;
|
||||
m_regionName = regionName;
|
||||
|
@ -182,6 +184,8 @@ namespace OpenSim.world
|
|||
/// Performs per-frame updates on the world, this should be the central world loop
|
||||
/// </summary>
|
||||
public void Update()
|
||||
{
|
||||
lock (updateLock)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -227,6 +231,7 @@ namespace OpenSim.world
|
|||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: Update() - Failed with exception " + e.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads a new storage subsystem from a named library
|
||||
|
|
Loading…
Reference in New Issue