diff options
author | Justin Clark-Casey (justincc) | 2012-03-02 00:22:23 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-03-02 00:22:23 +0000 |
commit | dcfd05c8eaa4550d9be4c673d660497da1e035c8 (patch) | |
tree | 9557ee643dcbd14dfb10a2d2fe86b160cea79935 | |
parent | Adds an OSSL command for regular expression-based string replacement. Parameters (diff) | |
download | opensim-SC-dcfd05c8eaa4550d9be4c673d660497da1e035c8.zip opensim-SC-dcfd05c8eaa4550d9be4c673d660497da1e035c8.tar.gz opensim-SC-dcfd05c8eaa4550d9be4c673d660497da1e035c8.tar.bz2 opensim-SC-dcfd05c8eaa4550d9be4c673d660497da1e035c8.tar.xz |
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.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 5c1bdff..8383c7f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -635,7 +635,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
635 | ts.next = | 635 | ts.next = |
636 | DateTime.Now.ToUniversalTime().AddSeconds(ts.interval); | 636 | DateTime.Now.ToUniversalTime().AddSeconds(ts.interval); |
637 | 637 | ||
638 | SenseRepeaters.Add(ts); | 638 | lock (SenseRepeatListLock) |
639 | SenseRepeaters.Add(ts); | ||
640 | |||
639 | idx += 6; | 641 | idx += 6; |
640 | } | 642 | } |
641 | } | 643 | } |