-
Notifications
You must be signed in to change notification settings - Fork 179
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 not sent when a client loses connection or JWT token expires #215
Comments
Thanks for bringing this up, @Smiche . |
For the first issue, that makes sense, but I haven't implemented client disconnection on JWT token expiration, so that's on me. 😄 |
@Smiche I'm glad upgrading solved the LWT issue! I'm gonna leave the issue open for a few days as a reminder to myself, I think I might get some time later this week. |
@Smiche I never got the time to go back to disconnecting users on expired tokens, but I may do so some time in the next few weeks. Do you think this is still relevant (I'd need to go over Mosquitto changes and options to do so again, I really haven't checked this in a long time) or is there a reasonable workaround for it from your experience? |
The way I went around it was to use acl from a file which gives full access to all topics and still use jwt for user auth. Now when a token expires nothing happens. This works for our use case at the moment, but disconnecting clients after a token expires would be definitely better. |
Gotcha, I'll keep it open then. Thanks! |
I'm gonna close this issue in favor of #106. |
Using an mqttjs 4.2.8 client with a will:
Mosquitto broker version: 2.0.12
mosquitto-go-auth plugin version: latest from master branch
Relevant configuration:
When a user disconnects ungracefully, e.g. app terminated the LWT is not sent on the authed listener.
When a token expires the connection remains open and the client doesn't receive any errors (unless a new sub or pub is attempted). In this case LWT is not sent either.
Possibly this issue is related to #106 and resolving it might fix this too.
The text was updated successfully, but these errors were encountered: