diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs index 25c823d..06307bb 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Runtime.Remoting.Lifetime; | 29 | using System.Runtime.Remoting.Lifetime; |
30 | using System.Security.Permissions; | ||
30 | using System.Threading; | 31 | using System.Threading; |
31 | using System.Reflection; | 32 | using System.Reflection; |
32 | using System.Collections; | 33 | using System.Collections; |
@@ -40,16 +41,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
40 | { | 41 | { |
41 | private Dictionary<string,MethodInfo> inits = new Dictionary<string,MethodInfo>(); | 42 | private Dictionary<string,MethodInfo> inits = new Dictionary<string,MethodInfo>(); |
42 | 43 | ||
43 | // | 44 | // Object expires if we don't keep it alive |
44 | // Never expire this object | 45 | // sponsor will be added on object load |
45 | // | 46 | [SecurityPermissionAttribute(SecurityAction.Demand, |
47 | Flags = SecurityPermissionFlag.Infrastructure)] | ||
46 | public override Object InitializeLifetimeService() | 48 | public override Object InitializeLifetimeService() |
47 | { | 49 | { |
48 | ILease lease = (ILease)base.InitializeLifetimeService(); | 50 | ILease lease = (ILease)base.InitializeLifetimeService(); |
49 | |||
50 | if (lease.CurrentState == LeaseState.Initial) | 51 | if (lease.CurrentState == LeaseState.Initial) |
51 | { | 52 | { |
52 | lease.InitialLeaseTime = TimeSpan.Zero; | 53 | lease.InitialLeaseTime = TimeSpan.FromMinutes(1); |
54 | lease.SponsorshipTimeout = TimeSpan.FromMinutes(2); | ||
55 | lease.RenewOnCallTime = TimeSpan.FromSeconds(2); | ||
53 | } | 56 | } |
54 | return lease; | 57 | return lease; |
55 | } | 58 | } |