internal void LeaseExpired(DateTime now)
{
lock(this)
{
BCLDebug.Trace("REMOTE","Lease ",id," LeaseExpired state ",((Enum)state).ToString());
if (state == LeaseState.Expired)
return;
// There is a small window between the time the leaseManager
// thread examines all the leases and tests for expiry and
// when an indivisual lease is locked for expiry. The object
// could get marshal-ed in this time which would reset its lease
// Therefore we check again to see if we should indeed proceed
// with the expire code (using the same value of 'now' as used
// by the leaseManager thread)
if (leaseTime.CompareTo(now) < 0)
ProcessNextSponsor();
}
}