-
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
[Bug]: WebSocket not completely disconnected #1817
Comments
@ogis-yamazaki is this a regression? Does this happens only in latest version or also previous one? If so could you detect which version caused the issue? I also suggest you to enable debug logs and see what happens, the will message should be sent from broker when it detects an unexpected close from client, this means for some reason this is not closing the socket: Line 179 in d86947f
And that is triggered when the stream is closed: MQTT.js/src/lib/BufferedDuplex.ts Line 77 in d86947f
Try to debug that and let me know |
Fixes #1817
Seems the issue was in introduced with BufferedDuplex in v5.3.0 so it affects all versions up to 5.4.0 |
Thank you for fixing the bug! |
MQTTjs Version
5.4.0
Broker
mosquitto v2.0.18
Environment
Browser
Description
I executed the
mqtt.Client#end()
function with the force option on the Websocket connection.But it doesn't seem to be actually disconnected.
It happens in the browser, not in the Node program
The following sample code did not send a Will message.
Not when the client disconnects, Will message was sent when the broker disconnects after keep_alive seconds.
Minimal Reproduction
u1 user is monitoring Will message arrival while u2 is forcibly disconnecting
u1
u2
environment
Debug logs
--
The text was updated successfully, but these errors were encountered: