Fix potential concurrency issue since the LSL notecard cache was not being checked for expiry under lock
parent
ff199668fe
commit
f8a57edb2c
|
@ -11347,7 +11347,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
public static void Cache(UUID assetID, string text)
|
public static void Cache(UUID assetID, string text)
|
||||||
{
|
{
|
||||||
CacheCheck();
|
CheckCache();
|
||||||
|
|
||||||
lock (m_Notecards)
|
lock (m_Notecards)
|
||||||
{
|
{
|
||||||
|
@ -11432,7 +11432,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
return line;
|
return line;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void CacheCheck()
|
public static void CheckCache()
|
||||||
|
{
|
||||||
|
lock (m_Notecards)
|
||||||
{
|
{
|
||||||
foreach (UUID key in new List<UUID>(m_Notecards.Keys))
|
foreach (UUID key in new List<UUID>(m_Notecards.Keys))
|
||||||
{
|
{
|
||||||
|
@ -11442,4 +11444,5 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue