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

When no will options are provided in the config file, mqtt connection fails #9

Open
ddewaele opened this issue Mar 20, 2020 · 2 comments
Labels
feature-request New feature or request

Comments

@ddewaele
Copy link

On my mosquitto broker v1.4, when I plcnext is trying to connect without specifying will options in the config file, the connection fails.

@ddewaele ddewaele added the feature-request New feature or request label Mar 20, 2020
@OWarneke
Copy link
Member

OWarneke commented Mar 20, 2020

Hello ddewaele,
thanks for the feedback.
We will have to check what exactly causes this issue.
As I understand it LastWill should not be demanded by the server...

Some ideas on workarounds:
What do you suggest?
Making the will config mandatory in the shema or adding a default Will?

@ddewaele
Copy link
Author

In my experience, not everyone is using will options so IMHO it should be optional.

I looked at the MQTT specs
http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html

and noticed that the connection flags dictate if a will topic / message needs to be provided. I have the impression that your client is sending Connect Flags 0x06 (meaning that it should provide a will topic / message) even when no will options are specified in the config.

So I would make them optional, and set the connect flags accordingly. I think you should send 0x02 if there is no will topic / message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants