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

Why can't it create a 'will' parameter, like creating ‘auth’, giving a null value if it is not appropriate? #114

Open
aruis opened this issue Dec 23, 2018 · 0 comments

Comments

@aruis
Copy link

aruis commented Dec 23, 2018

These two pieces of code should explain the problem

MqttWill will =
new MqttWill(msg.variableHeader().isWillFlag(),
msg.payload().willTopic(),
msg.payload().willMessage(),
msg.variableHeader().willQos(),
msg.variableHeader().isWillRetain());

MqttAuth auth = (msg.variableHeader().hasUserName() &&
msg.variableHeader().hasPassword()) ?
new MqttAuth(
msg.payload().userName(),
msg.payload().password()) : null;

Because of this problem, this code makes no sense.

https://github.com/vert-x3/vertx-examples/blob/5cec6110ae68ef587c66e00eaba89c4adf285d09/mqtt-examples/src/main/java/io/vertx/example/mqtt/app/Server.java#L53

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

No branches or pull requests

1 participant