Browse Source

关闭所有。

tom 2 months ago
parent
commit
70e36cbc81

+ 3 - 7
ruoyi-sim/src/main/java/com/ruoyi/sim/service/impl/CommSendService.java

@@ -1059,7 +1059,7 @@ public class CommSendService {
      */
      */
     public AjaxResult debugResetAnything() {
     public AjaxResult debugResetAnything() {
         // Step:关闭所有Socket连接
         // Step:关闭所有Socket连接
-
+        socketService.closeAll();
         // Step:ping路由器,返回在线情况。
         // Step:ping路由器,返回在线情况。
 
 
         // Step:ping教员端主机,返回在线情况。
         // Step:ping教员端主机,返回在线情况。
@@ -1077,11 +1077,7 @@ public class CommSendService {
         // Step:所有连接的模拟器,读取每一个模拟器的各个故障,是否处于考试准备ok状态
         // Step:所有连接的模拟器,读取每一个模拟器的各个故障,是否处于考试准备ok状态
 
 
         // 删除debug表中所有数据。
         // 删除debug表中所有数据。
-        try {
-            Thread.sleep(5000L);
-        } catch (InterruptedException e) {
-            throw new RuntimeException(e);
-        }
-        return AjaxResult.success("全部重置成功。todo:123456");
+        debugFaultService.deleteAll();
+        return AjaxResult.success("全部重置成功。老铁666!");
     }
     }
 }
 }