tls: prevent multiple connection errors
onConnectEnd()
, which is called by TLSSocket
, has a guard to prevent being called multiple times, but it does not prevent the OpenSSL error handler from being called, leading to multiple error
events. This commit adds that piece of missing logic.
Fixes: https://github.com/nodejs/node/issues/23631
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines