Andy 5 years ago
parent
commit
eb8a11dd49

+ 6 - 0
scheduler/src/main/java/cn/sagacloud/pojo/ChannelHandlerContextWrapper.java

@@ -53,6 +53,12 @@ public class ChannelHandlerContextWrapper {
         return -1;
     }
 
+    public void resetSendingTimeOutTask(int id){
+        if(id > 0){
+            taskSendingStatusMap.remove(id);
+        }
+    }
+
     public String getClientInfo() {
         return clientInfo;
     }

+ 1 - 0
scheduler/src/main/java/cn/sagacloud/server/DispatchTask.java

@@ -149,6 +149,7 @@ public class DispatchTask implements Runnable {
             if(id > 0){
                 // 是否加锁
                 tasks.get(id).setTask_status(0);
+                client.resetSendingTimeOutTask(id);
                 System.out.println("任务" + id + "发送超时, 已重置");
             }
         }