Пример #1
0
        public override void Dispose()
        {
            if (this.acceptor == null)
            {
                return;
            }

            foreach (long id in this.idChannels.Keys.ToArray())
            {
                TChannel channel = this.idChannels[id];
                channel.Dispose();
            }
            this.acceptor.Stop();
            this.acceptor = null;
        }
Пример #2
0
        public override void Dispose()
        {
            if (this.IsDisposed)
            {
                return;
            }

            base.Dispose();

            foreach (long id in this.idChannels.Keys.ToArray())
            {
                TChannel channel = this.idChannels[id];
                channel.Dispose();
            }
            this.acceptor?.Close();
            this.acceptor = null;
            this.innArgs.Dispose();
        }
Пример #3
0
        public override void Dispose()
        {
            bool IsDisposeLocal = this.IsDispose;

            base.Dispose();
            this.IsDispose = true;
            if (IsDisposeLocal)
            {
                return;
            }


            foreach (long id in this.idChannels.Keys.ToArray())
            {
                TChannel channel = this.idChannels[id];
                channel.Dispose();
            }
            this.acceptor?.Close();
            this.acceptor = null;
            this.innArgs.Dispose();
        }