From a315aee8035a28f7d6127e28120d7fbe36fba3be Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 2 Mar 2012 00:28:37 +0000 Subject: [PATCH] Move SenseRepeaters.Count check inside the SenseRepeatListLock. No methods in the List class are thread safe in the MS specification/documentation --- .../Shared/Api/Implementation/Plugins/SensorRepeat.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 818f4b21dd..331af1c30b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs @@ -152,12 +152,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins public void CheckSenseRepeaterEvents() { - // Nothing to do here? - if (SenseRepeaters.Count == 0) - return; - lock (SenseRepeatListLock) { + // Nothing to do here? + if (SenseRepeaters.Count == 0) + return; + // Go through all timers foreach (SenseRepeatClass ts in SenseRepeaters) {