智慧保安后台管理-外网
Administrator
2022-06-11 3a5d12b67221a19ff199846c19c4e74b71f3be84
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();
@@ -225,7 +229,7 @@
         //文件个数大于10个时开始处理
//         if (files.length==0 || files.length<10){
         if (files.length==0){
            ftp.logout();
//            ftp.logout();
            return false;
         }
         else {
@@ -270,13 +274,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 +336,7 @@
         FTPFile[] files = ftp.listFiles();
         //文件个数大于10个时开始处理
         if (files.length==0){
            ftp.logout();
            return false;
         }
         else {
@@ -369,13 +378,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();
@@ -524,7 +538,7 @@
         FTPFile[] files = ftp.listFiles();
         //文件个数大于10个时开始处理
         if (files.length==0){
            ftp.logout();
//            ftp.logout();
            return false;
         }
         else {
@@ -562,13 +576,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();