Closed DancingDream closed 1 year ago
应该是断线重连了,maxAttempts
设为0,捕获connect异常,重新订阅
好的
哈喽,大佬,现在又有问题,订阅接收一次消息后,会断开重连,主题会清空。将会话清理设置false,并用qos1重新订阅,再一次接收消息,之后断开不会重新连接。如果将maxAttempts设为0,则会报出“网络未受保护”错误。
心跳处理需要加上
大佬,心跳在config里面就已经设置为20,还需要在哪处理?
配置是配置,配置了以后需要根据自己逻辑定时ping pong。可以看下示例
大佬,你好。按照腾讯云和现在的库编写的程序,能成功发布消息,但是订阅后接收到的$client->recv()为true,没有消息,想了解下问题出在哪