Esempio n. 1
0
        private static void NotifyIdleSession(IoSession session, DateTime currentTime, IdleStatus status, DateTime lastIoTime)
        {
            Int64 idleTime = session.Config.GetIdleTimeInMillis(status);

            if (idleTime > 0)
            {
                DateTime lastIdleTime = session.GetLastIdleTime(status);
                if (lastIoTime < lastIdleTime)
                {
                    lastIoTime = lastIdleTime;
                }

                if ((currentTime - lastIoTime).TotalMilliseconds >= idleTime)
                {
                    session.FilterChain.FireSessionIdle(status);
                }
            }
        }