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