-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Impossible to catch error during tls.connect(duplex) #29678
Labels
tls
Issues and PRs related to the tls subsystem.
Comments
Qualtagh
changed the title
Can't catch error during tls.connect(duplex)
Impossible to catch error during tls.connect(duplex)
Sep 26, 2019
FWIW, Node 13 yields the expected output. |
Thank you! Yes, it's fixed now. Seems like error is emitted in nextTick in 13. |
This was referenced Apr 13, 2021
Open
This was referenced Sep 17, 2021
This was referenced Sep 29, 2022
This was referenced Oct 5, 2022
This was referenced Oct 8, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There seems to be no way to catch synchronous error of underlying duplex stream during
tls.connect
operation.Code sample:
Expected output:
Actual output:
Changing
async
to true solves the issue.Can we allow passing
onError
handler totls.connect
method? So, it will be set before calling_start()
method of TLSSocket.The text was updated successfully, but these errors were encountered: