-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 sent on normal disconnection #1597
Comments
For clarity, attached another capture with no active subscribers. I can't see a disconnect message? |
Try reproduce this with also broker in the same script. You can use Aedes broker for example. Once you reproduce it in a simple script you can also try to do a debug on mqttjs side. The LWT is sent by the broker when he detects an unexpected close of connection by the client (disconnect packet isn't received and ack) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have the following typescript code, using MQTT.js 4.3.7:
When
shutdown
is called, I get the following console output:However, observing the published messages shows "offline" is published (correct) followed by "offline-unexpected"? Why is the LWT sent on normal connection close? I've attached a Wireshark trace.
mqtt capture.pcapng.zip
The text was updated successfully, but these errors were encountered: