paho.mqtt.python
paho.mqtt.python copied to clipboard
Incorrect handling of DISCONNECT packet
I believe the handling of DISCONNECT (at least for MQTT 5) isn't correct:
https://github.com/eclipse/paho.mqtt.python/blob/d45de3737879cfe7a6acc361631fa5cb1ef584bb/src/paho/mqtt/client.py#L4021C1-L4022C1
I'm using paho as a test client and it doesn't seem to be correctly handling a DISCONNECT packet with a non-zero reason code and zero length properties (i.e. Remaining_Length = 2).