-
Notifications
You must be signed in to change notification settings - Fork 252
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
rumqttd: Non graceful disconnects do not send last will #783
Comments
Hey, is rumqttd showing that client is disconnected in logs? this might be related to #777 (comment) also can you confirm what keepalive time is used by the client? You can try setting some keepalive time for client, or set TCP Keepalive options in linux using Thank you! |
Hey, thanks for the reply! I've set the log level to trace and there's no info when the client disconnects. The keepalive is set to 10s and when client is connected I can clearly see the packets, but when it non-gracefully disconnects, it can hang for minutes without any logs. The
However broker still doesn't know about the disconnected client even after couple of minutes. The last logs of that device are:
|
then it should have disconnected the client ( regardless of how are we disconnecting ) I ran rumqttd, and then connected modified rumqttc ( which doesn't send pings ) to it, I am able to replicate the behavior locally! so the actual issue seems to be MQTT keepalive isn't being used at all, thus inactive clients aren't disconnected! I will open a PR to fix this ASAP :) |
This issues should be fixed by #784 , if it is possible, can you checkout & verify? Thank you so much for pointing out the issue 🚀 |
@swanandx: The PR worked great! |
closing this issue as PR #784 is merged! feel free to reopen if required :) |
Expected Behavior
When client drops connection non-gracefully, the last will should be sent
Current Behavior
Last will is never sent.
Context
The text was updated successfully, but these errors were encountered: