public override void Close() { if (!Closed) { Closed = true; _nextReader.Close(); } }
public override void Close() { if (!Closed && Status != MessageProcessorStatus.Idle) { Closed = true; if (_queue != null) { _queue.Close(); } _nextReader.Close(); } }
public void Dispose() { if (IsDisposed) { return; } _pingPongTimer?.Stop(); _authTimer?.Stop(); if (_messageReader != null) { _messageReader.PacketReceived -= ClientOnPacketReceived; _messageReader.StreamClosed -= MessageReaderOnStreamClosed; } _messageReader?.Close(); _messageWriter?.Close(); _client?.Close(); IsDisposed = true; }