1、回退参数
This commit is contained in:
parent
cdd5599ea9
commit
65b02c3e90
@ -122,9 +122,9 @@ public class GXXfzForwarder extends Forwarder{
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean checkResult() throws InterruptedException {
|
boolean checkResult() throws InterruptedException {
|
||||||
// 等待应答,最多等0.5s
|
// 等待应答,最多等1s
|
||||||
for(int i=0; i<25; i++){
|
for(int i=0; i<10; i++){
|
||||||
Thread.sleep(20);
|
Thread.sleep(100);
|
||||||
if(listener.state == XFZTCPListener.STATE_OK) return true;
|
if(listener.state == XFZTCPListener.STATE_OK) return true;
|
||||||
else if(listener.state == XFZTCPListener.STATE_FAILED) return false;
|
else if(listener.state == XFZTCPListener.STATE_FAILED) return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -80,7 +80,7 @@ public class GZYMQTTForwarder extends Forwarder {
|
|||||||
logger.info("forward to GZY mqtt: {}",json);
|
logger.info("forward to GZY mqtt: {}",json);
|
||||||
try {
|
try {
|
||||||
if(!mqttClient.publish(topic, json)) break;
|
if(!mqttClient.publish(topic, json)) break;
|
||||||
Thread.sleep(20);
|
Thread.sleep(50);
|
||||||
} catch (Exception e1) {
|
} catch (Exception e1) {
|
||||||
e1.printStackTrace();
|
e1.printStackTrace();
|
||||||
}
|
}
|
||||||
@ -119,7 +119,7 @@ public class GZYMQTTForwarder extends Forwarder {
|
|||||||
logger.info("forward to GZY mqtt angles: {}",json);
|
logger.info("forward to GZY mqtt angles: {}",json);
|
||||||
try {
|
try {
|
||||||
if(!mqttClient.publish(topic, json)) break;
|
if(!mqttClient.publish(topic, json)) break;
|
||||||
Thread.sleep(20);
|
Thread.sleep(10);
|
||||||
} catch (Exception e1) {
|
} catch (Exception e1) {
|
||||||
e1.printStackTrace();
|
e1.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user