Message type not checked in function Adafruit_MQTT_Subscribe *Adafruit_MQTT::readSubscription(int16_t timeout). This results in any unexpected packed to be misinterpreted as PUBLISH. In example, if ping response (PINGRESP) arrives after ping timeout, it is parsed as duplicated last subscription. Looks like same problem in this issue: #7
Log file for example:
MQTT ping packet:
[0xC0], [0x00],
Client sendPacket returned: 2
Read data: [0xD0],
Packet Type: [0xD0],
Read data: [0x00],
Packet Length: 0
Packet len: 2
[0xD0], [0x00], // PINGRESP packet, 2 bytes
Looking for subscription len 13 // parsed as PUBLISH
Found sub #55 Data len: 99
Data: 22
22
Message type not checked in function Adafruit_MQTT_Subscribe *Adafruit_MQTT::readSubscription(int16_t timeout). This results in any unexpected packed to be misinterpreted as PUBLISH. In example, if ping response (PINGRESP) arrives after ping timeout, it is parsed as duplicated last subscription. Looks like same problem in this issue: #7 Log file for example: