From faaf47a86f34f24dec0d7d51eda638d0df3db305 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 16 Jan 2015 23:55:00 +0000 Subject: Prevent a race condition between the script engine backup thread and script removal by locking on the script's EventQueue and only proceeding if it's flagged as still running. Relates to http://opensimulator.org/mantis/view.php?id=7407 --- OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Interfaces') diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs index 35e5f18..fa2ceef 100644 --- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs @@ -178,8 +178,9 @@ namespace OpenSim.Region.ScriptEngine.Interfaces /// /// How many milliseconds we will wait for an existing script event to finish before /// forcibly aborting that event. + /// If true then the event queue is also cleared /// true if the script was successfully stopped, false otherwise - bool Stop(int timeout); + bool Stop(int timeout, bool clearEventQueue = false); void SetState(string state); -- cgit v1.1