Пример #1
0
        internal void AiDelayedClose()
        {
            if (Session == null || MyGrid == null || Closed)
            {
                Log.Line($"AiDelayedClose: Session is null {Session == null} - Grid is null {MyGrid == null}  - Closed: {Closed}");
                return;
            }

            if (!ScanInProgress && Session.Tick - ProjectileTicker > 59 && AiMarkedTick != uint.MaxValue && Session.Tick - AiMarkedTick > 119)
            {
                //lock (DbLock)
                using (DbLock.AcquireExclusiveUsing())
                {
                    if (ScanInProgress)
                    {
                        return;
                    }
                    Session.GridAiPool.Return(this);
                }
            }
        }