Esempio n. 1
0
 public void Release()
 {
     try
     {
         // The inner socket can be closed by CloseAsIs and when SafeHandle runs ReleaseHandle.
         InnerSafeCloseSocket innerSocket = Volatile.Read(ref _innerSocket);
         if (innerSocket != null)
         {
             innerSocket.Release();
         }
     }
     catch (Exception e)
     {
         Debug.Assert(false, "SafeCloseSocket.Release after inner socket disposed." + e);
     }
 }