mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
A synchronous custom lookup can abort the socket before tls.connect() applies the session and SNI, leaving the TLS handle unavailable. Initialize both before starting the connection so the original socket error is emitted normally. Assisted-by: Codex Signed-off-by: Steven <steven@ceriously.com> PR-URL: https://github.com/nodejs/node/pull/65624 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>