public virtual void Dispose() { if (Interlocked.Increment(ref _disposed) != 1) { //Only dispose once return; } _tcpSocket.Dispose(); }
public virtual void Dispose() { if (Interlocked.Increment(ref _disposed) != 1) { //Only dispose once return; } _idleTimer.Dispose(); _tcpSocket.Dispose(); _keyspaceSwitchSemaphore.Dispose(); }
public virtual void Dispose() { if (Interlocked.Increment(ref _disposed) != 1) { //Only dispose once return; } _idleTimer.Dispose(); _tcpSocket.Dispose(); var readStream = Interlocked.Exchange(ref _readStream, null); if (readStream != null) { readStream.Dispose(); } }