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

Wrong reason code on disconnect while session takeover. #2607

Closed
der-b opened this issue Aug 8, 2022 · 1 comment
Closed

Wrong reason code on disconnect while session takeover. #2607

der-b opened this issue Aug 8, 2022 · 1 comment
Labels
Component: mosquitto-broker Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. Type: Bug
Milestone

Comments

@der-b
Copy link

der-b commented Aug 8, 2022

I think mosquitto is not complaint whit the MQTT 5.0 specification. I'm using the libmosquitto and if i connect two clients with the same ClientID to the broker, than the reason code of the disconnect callback is 0x7 (unknown reason). The MQTT specification in section 3.1.4 states the following:

If the ClientID represents a Client already connected to the Server, the Server sends a DISCONNECT packet to the existing Client with Reason Code of 0x8E (Session taken over) as described in section 4.13 and MUST close the Network Connection of the existing Client.

Therefor I think, the correct return code would be 0x8E in my case.

Kind regards,

Bernd

ralight added a commit that referenced this issue Aug 10, 2022
This is for when a client session is taken over.

Closes #2607. Thanks to der-b
@ralight
Copy link
Contributor

ralight commented Aug 11, 2022

This was fixed in the develop branch, I've backported that fix for 2.0.15. Thanks for the report!

@ralight ralight closed this as completed Aug 11, 2022
@ralight ralight added this to the 2.0.15 milestone Aug 11, 2022
@ralight ralight added Type: Bug Component: mosquitto-broker Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. labels Aug 11, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: mosquitto-broker Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants