智慧保安后台管理-外网
Administrator
2022-06-10 27f24d1fe8a146a3b8256abe742b97ee92a1660c
src/main/java/org/springblade/modules/quartz/task/Task.java
@@ -121,7 +121,6 @@
         FTPFile[] files = ftp.listFiles();
         if (files.length==0){
            ftp.logout();
            return false;
         }
         else {
@@ -167,13 +166,18 @@
               }
            }
            //关闭流
            ftp.completePendingCommand();
            ftp.logout();
//            ftp.completePendingCommand();
//            ftp.logout();
         }
      } catch (Exception e) {
         System.out.println("ftp连接失败");
         e.printStackTrace();
      } finally {
         try {
            ftp.logout();
         } catch (IOException e) {
            e.printStackTrace();
         }
         if (ftp.isConnected()) {
            try {
               ftp.disconnect();
@@ -327,7 +331,7 @@
         FTPFile[] files = ftp.listFiles();
         //文件个数大于10个时开始处理
         if (files.length==0){
            ftp.logout();
            return false;
         }
         else {
@@ -369,13 +373,18 @@
               }
            }
            //关闭流
            ftp.completePendingCommand();
            ftp.logout();
//            ftp.completePendingCommand();
//            ftp.logout();
         }
      } catch (Exception e) {
         System.out.println("ftp连接失败");
         e.printStackTrace();
      } finally {
         try {
            ftp.logout();
         } catch (IOException e) {
            e.printStackTrace();
         }
         if (ftp.isConnected()) {
            try {
               ftp.disconnect();