esp_mqtt
esp_mqtt copied to clipboard
Zero length packets error when using SSL
Connecting to Mosquitto with encryption enabled the client throws unnecessary error messages. For every packet received I first get two debug messages related to a 0 length packet. Simple example for keep-alive (pingres):
MQTT: Send keepalive packet to xxxxx.xxx:1883! MQTT: Sending, type: 12, id: 0000 TCP: Sent TCP: data received 0 bytes ERROR: Message too long TCP: data received 2 bytes
Functionality seems not to be compromised. Looking at the traffic with Wireskark (with the private key provided to decode the traffic) it seems like the messages are caused by some of the acknowledge packages. These should be ignored instead.
To reduce confusion it would help to have a specific error message for zero length or at least change the message to "Message too long or empty" ;)
me too.