diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptSponsor.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptSponsor.cs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptSponsor.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptSponsor.cs index 977ac30..a2da14e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptSponsor.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptSponsor.cs | |||
@@ -32,19 +32,15 @@ using System.Text; | |||
32 | 32 | ||
33 | namespace OpenSim.Region.ScriptEngine.Shared.Api.Runtime | 33 | namespace OpenSim.Region.ScriptEngine.Shared.Api.Runtime |
34 | { | 34 | { |
35 | [Serializable] | ||
35 | public class ScriptSponsor : MarshalByRefObject, ISponsor | 36 | public class ScriptSponsor : MarshalByRefObject, ISponsor |
36 | { | 37 | { |
37 | private bool m_closed = false; | 38 | // In theory: I execute, therefore I am. |
38 | 39 | // If GC collects this class then sponsorship will expire | |
39 | public TimeSpan Renewal(ILease lease) | 40 | public TimeSpan Renewal(ILease lease) |
40 | { | 41 | { |
41 | if (!m_closed) | 42 | return TimeSpan.FromMinutes(2); |
42 | return lease.InitialLeaseTime; | ||
43 | return TimeSpan.FromTicks(0); | ||
44 | } | 43 | } |
45 | |||
46 | public void Close() { m_closed = true; } | ||
47 | |||
48 | #if DEBUG | 44 | #if DEBUG |
49 | // For tracing GC while debugging | 45 | // For tracing GC while debugging |
50 | public static bool GCDummy = false; | 46 | public static bool GCDummy = false; |