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; }
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(); }
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(); }