Esempio n. 1
0
 public virtual void Dispose()
 {
     if (Interlocked.Increment(ref _disposed) != 1)
     {
         //Only dispose once
         return;
     }
     _tcpSocket.Dispose();
 }
Esempio n. 2
0
 public virtual void Dispose()
 {
     if (Interlocked.Increment(ref _disposed) != 1)
     {
         //Only dispose once
         return;
     }
     _idleTimer.Dispose();
     _tcpSocket.Dispose();
     _keyspaceSwitchSemaphore.Dispose();
 }
Esempio n. 3
0
        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();
            }
        }