-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
TLS Client on node.js hangs forever if certificate is invalid or revoked #1776
Comments
If you use the normal connect instead of the connectAsync and add a listener to |
Hi Daniel, I tried that as well (wrote it below the log output)
|
Sorry, missed that part. By checking your logs it seems it get stucked after this line: MQTT.js/src/lib/connect/tls.ts Lines 20 to 25 in c8b6695
I suggest you to try debugging code to see if you find the reason why that hangs, there are error listeners stetup there and I don't know why them are not triggered |
May be fixed by #1779 , try 5.3.5 and feel free to re-open in case |
Hi,
I'm running into a problem that seems to be similar to this issue.
My setup is following:
While certificate is valid and client is allowed to connect, everything is working as expected. For example bringing the network interface down and back up again will trigger a successful reconnect.
But if certificate is invalid OR revoked from AWS IoT Core side connectAsync will just "hang" forever. It will never throw nor trigger any of the callbacks from the sample code below:
When I run it with
DEBUG='mqttjs*'
following output is shown (and retries forever):I tried the same scenario with connect instead of connectAsync and following callbacks will trigger: offline, close, reconnect but no error is thrown or any type of indication what went wrong.
The text was updated successfully, but these errors were encountered: