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

MQTTClient_connect return code does not give good hints on why connect failed #1040

Closed
cuttlfish opened this issue Jan 8, 2021 · 2 comments

Comments

@cuttlfish
Copy link

Describe the bug
MQTTClient_connect return -1 for different type of failures. It be nice to get a more concise error code

To Reproduce
For example connecting a invalid server will return -1 as well as connecting to a server with invalid certificate like this error
20210108 193636.818 SSL alert write:fatal:certificate expired
20210108 193636.818 SSL connect:error
20210108 193636.818 (3060595968) (5)> SSLSocket_error:101
Also return -1
As well as any connection to server with a port blocked all return -1 as error and not able to figure out why the connect failed

Expected behavior
A clear and concise description of what you expected to happen.

** Environment (please complete the following information):**

  • OS: Linux
  • Version 4.9.225-1.18
@icraggs
Copy link
Contributor

icraggs commented Jan 9, 2021

  1. There is an OpenSSL error callback in the SSL options.

  2. This is a duplicate of Improved connection errors #937

@icraggs
Copy link
Contributor

icraggs commented Jan 14, 2021

I'm going to track this in #937

@icraggs icraggs closed this as completed Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants