Commit 5323cb2a by 罗志长

mqtt最大重连次数

parent cecc21a3
...@@ -101,7 +101,7 @@ public class PushCallback implements MqttCallbackExtended { ...@@ -101,7 +101,7 @@ public class PushCallback implements MqttCallbackExtended {
logger.info("连接断开,可以重连", cause); logger.info("连接断开,可以重连", cause);
int times = 1; int times = 1;
while (client == null || !client.isConnected()) { while (client == null || !client.isConnected()) {
if (times > 5) { if (times > 10) {
logger.info("已达最大次数"); logger.info("已达最大次数");
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment