liurunyu
2024-11-19 37ad41fcac6e1e465db4f9bca397f1e26baa66ab
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/upgrade/UpgradeManager.java
@@ -53,11 +53,24 @@
        if(this.task != null && !this.task.taskIsOver){
            throw new Exception("当前存在升级任务,请等待当前任务执行完或强制结束当前任务");
        }else {
            this.task.forceOver();
            this.task = new UpgradeTask();
            this.task.initOption(this.failTryTimes, this.ugMaxRtuSameTime);
            this.task.setTask(vo);
            this.start(this);
            Exception ex = null ;
            try{
                if(this.task != null){
                    this.task.forceOver();
                }
                this.task = new UpgradeTask();
                this.task.initOption(this.failTryTimes, this.ugMaxRtuSameTime);
                this.task.setTask(vo);
            }catch (Exception e){
                ex = e ;
            }finally {
                if(ex != null){
                    this.task = null ;
                    throw ex ;
                }else{
                    this.start(this);
                }
            }
        }
    }