Exemple #1
0
 /// <summary>
 /// Attempt to shut the session down correctly.
 /// </summary>
 private void Cleanup()
 {
     Debug.WriteLineIf(DccUtil.DccTrace.TraceInfo, "[" + Thread.CurrentThread.Name + "] DccFileSession::Cleanup()");
     DccFileSessionManager.DefaultInstance.RemoveSession(this);
     if (serverSocket != null)
     {
         serverSocket.Close();
     }
     if (socket != null)
     {
         try
         {
             socket.Close();
         }
         catch (Exception)
         {
             //Ignore this exception
         }
     }
     dccFileInfo.CloseFile();
 }