1、回退参数

This commit is contained in:
weidong 2025-05-26 09:40:49 +08:00
parent cdd5599ea9
commit 65b02c3e90
2 changed files with 5 additions and 5 deletions

View File

@ -122,9 +122,9 @@ public class GXXfzForwarder extends Forwarder{
}
boolean checkResult() throws InterruptedException {
// 等待应答最多等0.5s
for(int i=0; i<25; i++){
Thread.sleep(20);
// 等待应答最多等1s
for(int i=0; i<10; i++){
Thread.sleep(100);
if(listener.state == XFZTCPListener.STATE_OK) return true;
else if(listener.state == XFZTCPListener.STATE_FAILED) return false;
}

View File

@ -80,7 +80,7 @@ public class GZYMQTTForwarder extends Forwarder {
logger.info("forward to GZY mqtt: {}",json);
try {
if(!mqttClient.publish(topic, json)) break;
Thread.sleep(20);
Thread.sleep(50);
} catch (Exception e1) {
e1.printStackTrace();
}
@ -119,7 +119,7 @@ public class GZYMQTTForwarder extends Forwarder {
logger.info("forward to GZY mqtt angles: {}",json);
try {
if(!mqttClient.publish(topic, json)) break;
Thread.sleep(20);
Thread.sleep(10);
} catch (Exception e1) {
e1.printStackTrace();
}