Closed dmitryuv closed 4 years ago
Hi @dmitryuv ,
According to MQTT specs (v5 for example), PINGREQ-PINGRESP is used to "Indicate to the Server that the Client is alive in the absence of any other MQTT Control Packets being sent from the Client to the Server."
So if you've subscribed and receiving only QoS 0 messages all time - the client should not send any PUBACK packets and the server is only sending data all time without any response. In this case, the server may decide that client is dead and break the connection.
So I have to change the luamqtt logic to send PINGREQ packets to reset ping-timer only after client packets.
Hi @dmitryuv , please check the new version v3.1.2
I've checked latest version – now connection to broker is stable, fix works. Thank you!
It seems that broker is dropping connection (by design) because ping is sent only when connection is idle (if i read source correctly), but if i'm in receive-only mode and constantly receiving something, then ping may be never sent out. Have you faced this issue? Steps to reproduce – with default settings connect to broker that sends something about every minute, and in ~1.5 minutes you'll be disconnected.