Skip to content
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 is sent when a connection is rejected #8886

Closed
jsantacruz87 opened this issue Sep 2, 2022 · 1 comment · Fixed by #8887
Closed

LWT is sent when a connection is rejected #8886

jsantacruz87 opened this issue Sep 2, 2022 · 1 comment · Fixed by #8887

Comments

@jsantacruz87
Copy link

What happened?

I try to connect a client that doesn't have permissions, setting the last will message option, and althought the validation works perfectly, the broker publish the LWT message.
I think that it is a bug, because the client wasn't connected to the broker.

What did you expect to happen?

I expect that the broker doesn't send LWT message because the client was not connected.

How can we reproduce it (as minimally and precisely as possible)?

Try to connect to a broker with the MQTTX.app , set the LWT options ( topic:any that has a subscriber to could see the LWT that is published, payload:any, etc.. ) and set wrong client's options (username, clientid, password).
The subscriber will receive a LWT message of the client that is not connected.

Anything else we need to know?

No response

EMQX version

sysdescr : EMQX
version : 5.0.2
datetime : 2022-08-29T11:37:37.570495507+00:00
uptime : 2 days, 12 hours, 46 minutes, 34 seconds

OS version

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

$ uname -a
Linux 69ee644bc5ed 5.10.104-linuxkit #1 SMP Thu Mar 17 17:08:06 UTC 2022 x86_64 GNU/Linux

Log files

@thalesmg
Copy link
Contributor

thalesmg commented Sep 5, 2022

Hi @jsantacruz87 !

Thanks for the report, it'll be fixed in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants