Commit 712b9db5 by “liusq”

修改mqtt心跳时间

parent c8177478
......@@ -80,7 +80,7 @@ void MqttSubscriber::start() {
// 设置连接选项
MQTTAsync_connectOptions conn_opts = MQTTAsync_connectOptions_initializer;
conn_opts.keepAliveInterval = 20;
conn_opts.keepAliveInterval = 35;
conn_opts.cleansession = 1;
QByteArray bUsername = config.username.toUtf8();
......@@ -165,7 +165,7 @@ void MqttSubscriber::onSubscribeFailure(MQTTAsync_failureData* response) {
}
void MqttSubscriber::connectionLost(char* cause) {
qInfo() << "连接丢失";
qInfo() << "连接丢失"<<cause;
if (cause) {
qInfo() << "Cause:" << cause;
}
......
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 to comment