mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
Add LifetimeService overrides to all MarshalByRef derived classes to prevent the remoting interfaces from expiring.
This commit is contained in:
@@ -40,6 +40,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
{
|
||||
private Dictionary<string,MethodInfo> inits = new Dictionary<string,MethodInfo>();
|
||||
|
||||
//
|
||||
// Never expire this object
|
||||
//
|
||||
public override Object InitializeLifetimeService()
|
||||
{
|
||||
ILease lease = (ILease)base.InitializeLifetimeService();
|
||||
|
||||
if (lease.CurrentState == LeaseState.Initial)
|
||||
{
|
||||
lease.InitialLeaseTime = TimeSpan.Zero;
|
||||
}
|
||||
return lease;
|
||||
}
|
||||
|
||||
public ScriptBaseClass()
|
||||
{
|
||||
MethodInfo[] myArrayMethodInfo = GetType().GetMethods(BindingFlags.Public|BindingFlags.Instance);
|
||||
|
||||
Reference in New Issue
Block a user