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
LWT emitted on clean disconnect. #1367
Comments
I've written a test to try and reproduce this, but it is working as expected. Can you share some code that shows what you are seeing? Thanks |
It's a sample I recently put up in the develop branch of the C++ library: I can try to do a smaller example or repeat with a different client, since it could be on the client side. But it's completely consistent. I see this for the log:
When I call disconnect, Mosquitto reports a socket error, then the last "Sending PUBLISH" is it emitting the LWT. |
Thanks. I had a quick look in the repo but didn't spot that. I'll take a look later. |
The only new/different things with this example:
|
Wireshark shows the Disconnect Request going on the wire after the last publish is ACK'ed:
But Mosquitto is hitting |
These were being treated as a protocol error. Closes #1367. Thanks to Frank Pagliughi.
That's sorted now thanks! It was being treated as a protocol error due to an incorrect check, and the test for it wasn't sufficient either. |
That fixed it on my end. Thanks! The V5 stuff looks great. Can't wait to get the client libs wrapped up. |
I recently ran into this issue, too. I tested the Thanks for the quick turnaround. Any estimate for when this will be in a tagged release? |
These were being treated as a protocol error. Closes #1367. Thanks to Frank Pagliughi.
Hey. I'm writing a little chat sample app for the next Paho C++ release, using an MQTT v5 connection. I believe I'm disconnecting cleanly, but the broker is still emitting the LWT message.
I tried it with Mosquitto v1.6.3 and 1.6.4. Both behave the same. This is on an x86_64, running Mint 19.
I'm connecting with a clean start, then subscribing to a single topic using the "no local" option. I can publish messages fine. But then when I disconnect, the LWT is emitted.
I also tested my client app against the Paho "testing" broker and VerneMQ. They behave in the way I expect.
Thanks.
The text was updated successfully, but these errors were encountered: