Beispiel #1
0
 public void Disconnect(XenAPI.Session xenSession)
 {
     try
     {
         if (iDisk != null)
         {
             iDisk.Dispose();
         }
         iDisk = null;
     }
     catch (Exception exn)
     {
         Log.Warning("Exception when disposing iDisk", exn);
     }
     try
     {
         if (_iscsisession != null)
         {
             _iscsisession.Dispose();
         }
         _iscsisession = null;
     }
     catch (Exception exn)
     {
         Log.Warning("Exception when disposing iscsisession", exn);
     }
     StopiScsiTarget(xenSession);
 }
Beispiel #2
0
        public void Disconnect(XenAPI.Session xenSession)
        {
            try
            {
                if (iDisk != null)
                {
                    iDisk.Dispose();
                }
                iDisk = null;
            }
            catch (Exception exn)
            {
                log.Debug("Failed to dispose iDisk. Continuing.", exn);
            }

            try
            {
                if (_iscsisession != null)
                {
                    _iscsisession.Dispose();
                }
                _iscsisession = null;
            }
            catch (Exception exn)
            {
                log.Debug("Failed to dispose iScsiSession. Continuing.", exn);
            }

            StopiScsiTarget(xenSession);
        }