mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
lock SenseRepeatListLock when added a new sensor during script reconstitution.
This is already being done in the other place where a sensor is added. Adding a sensor whilst another thread is iterating over the sensor list can cause a concurrency exception.
This commit is contained in:
@@ -635,7 +635,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
|||||||
ts.next =
|
ts.next =
|
||||||
DateTime.Now.ToUniversalTime().AddSeconds(ts.interval);
|
DateTime.Now.ToUniversalTime().AddSeconds(ts.interval);
|
||||||
|
|
||||||
SenseRepeaters.Add(ts);
|
lock (SenseRepeatListLock)
|
||||||
|
SenseRepeaters.Add(ts);
|
||||||
|
|
||||||
idx += 6;
|
idx += 6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user