Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect handling of DISCONNECT packet #860

Open
NickFoubert opened this issue Sep 10, 2024 · 1 comment
Open

Incorrect handling of DISCONNECT packet #860

NickFoubert opened this issue Sep 10, 2024 · 1 comment
Labels
Status: Available No one has claimed responsibility for resolving this issue.

Comments

@NickFoubert
Copy link

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).

@github-actions github-actions bot added the Status: Available No one has claimed responsibility for resolving this issue. label Sep 10, 2024
@abeaum
Copy link

abeaum commented Jan 8, 2025

I have also come across the same issue, which appears also to be dependent on the MQTT broker.

The DISCONNECT reason codes can be extracted by paho-mqtt when using hivemq as a broker (because hivemq DISCONNECT packet has a length > 2 bytes), but it doesn't extract the reason code when I use mosquitto.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Available No one has claimed responsibility for resolving this issue.
Projects
None yet
Development

No branches or pull requests

2 participants