Example #1
0
 /// <summary>
 /// 断开SFTP
 /// </summary>
 private void DisconnectSFTP()
 {
     try
     {
         if (_session != null)
         {
             if (_session.isConnected())
             {
                 _channel.disconnect();
                 _session.disconnect();
             }
         }
     }
     catch (Exception e)
     {
         _log.Error("断开SFTP失败!", e);
     }
 }