连接上mqtt服务器后,一段时间就出现下面提示:
on_disconnect callback rc = 7
on_connect callback rc = 0
on_disconnect callback rc = 7
on_connect callback rc = 0
on_disconnect callback rc = 7
on_connect callback rc = 0
on_disconnect callback rc = 7
on_connect callback rc = 0
on_disconnect callback rc = 7
on_connect callback rc = 0
on_disconnect callback rc = 7
on_connect callback rc = 0
on_disconnect callback rc = 7
on_connect callback rc = 0
on_disconnect callback rc = 7
on_connect callback rc = 0

在网上看了一下,有说同一个clientid二个连接同时使用可以有导致这个问题,也有说调小keepalive就好了。

I guess i solve this question.

i set a small keep-alive number. And NOT happen until now.

将原来的keepalive从60调到30就好了。

本文链接地址:https://const.net.cn/211.html

标签: mqtt

添加新评论