-
Notifications
You must be signed in to change notification settings - Fork 54
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 LWT/ graceful disconnect incorrect? #100
Comments
I just read up on what the MQTT 3.1.1 specification says about dispatching last will messages. The message should not get dispatched if the client send the disconnect message; I have to confirm that this is the case. BTW: I am working on supporting MQTT 5; it changes how disconnect works. The user have options for specifying when the last will should get dispatched and such. I don't know when I will be done with the MQTT support. |
I just checked it with the following approach:
All tortoises are running as v0.9.4
To me this seems to work as expected. Have I missed something in my testing? |
Might be related but, When I connect to Google IoT core using tortoise, if I kill tortoise I see in the Google logs) that the disconnect message throws an error. However if I call |
LWT is triggered on the broker even why the connection is terminated with the disconnect/1 method:
The Tortoise.Connection is added as a child to the DynamicSupervisor and after stopping all children with:
DynamicSupervisor.stop(Tasks, :shutdown)
The LWT is triggered on broker (emqx and mosquitto). Also when calling disconnect/1 I can see that LWT message is published.
:ok = Tortoise.Connection.disconnect("some_client_id")
The text was updated successfully, but these errors were encountered: