From 7b5a12d1114b9609ea39bb1b201dfe50bf252c76 Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期二, 23 七月 2024 15:34:23 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 pipIrr-platform/pipIrr-web/pipIrr-mwTest-rtu/src/main/java/com/dy/pipIrrMwTestRtu/tcpClient/TcpClUnit.java |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-mwTest-rtu/src/main/java/com/dy/pipIrrMwTestRtu/tcpClient/TcpClUnit.java b/pipIrr-platform/pipIrr-web/pipIrr-mwTest-rtu/src/main/java/com/dy/pipIrrMwTestRtu/tcpClient/TcpClUnit.java
index d698a66..6d8eced 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-mwTest-rtu/src/main/java/com/dy/pipIrrMwTestRtu/tcpClient/TcpClUnit.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-mwTest-rtu/src/main/java/com/dy/pipIrrMwTestRtu/tcpClient/TcpClUnit.java
@@ -108,13 +108,22 @@
         new Thread(new Runnable(){
             @Override
             public void run() {
-                while(true){
+                if(ServerProperties.onlyOneHeartBeat){
                     try {
                         UpHeartBeat.upCd02Data(ServerProperties.rtuAddr);
                         Thread.sleep(30000L);
                         //Thread.sleep(30000000L);
                     }catch (Exception e){
-                        continue;
+                    }
+                }else{
+                    while(true){
+                        try {
+                            UpHeartBeat.upCd02Data(ServerProperties.rtuAddr);
+                            Thread.sleep(30000L);
+                            //Thread.sleep(30000000L);
+                        }catch (Exception e){
+                            continue;
+                        }
                     }
                 }
             }

--
Gitblit v1.8.0