-
Notifications
You must be signed in to change notification settings - Fork 8
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
Invalid user/password are not reported #16
Comments
This functionality is indeed missing.
Expected that there is a mechanism to handle this issue e.g. `$mqtt->publish('info', 'OK') or die ...`
The problem with that is that Net::MQTT::Simple auto-reconnects. Login failures are less likely to be transient but may still be.
There is currently no handling of connection failures.
|
I understand this. Maybe you could introduce
so that the client at least can have a possibility to check initial connect? Basically there is such function, but it is not exposed as official API. Indeed, the situation may change over time i.e. the user may be removed at the server etc, but I think the ability to check the first login would help a lot to resolve trivial authentication issues.
as well. Alternatively, if you don't like the
Also what I see from tcpdump, the library ignores the authentication error and sends the message to the server. So it just pushes everything to the server without looking around. |
I wrote a wrapper to die on bad credintials. But, it uses the _connect internal method so I don't expect it to be supported forever.
|
If MQTT user/password are incorrectly configured the library (v5.28.1) anyway tries to send the message ignoring the server error. Server log (Mosquitto v1.5.7):
Expected that there is a mechanism to handle this issue e.g.
$mqtt->publish('info', 'OK') or die ...
Code:
The text was updated successfully, but these errors were encountered: