SIGN IN SIGN UP
denoland / deno UNCLAIMED

A modern runtime for JavaScript and TypeScript.

0 0 54 Rust

fix(ext/node): fix TLS crash with Happy Eyeballs address fallback (#33641)

## Summary

- Fixes `TypeError: this._handle.start is not a function` that occurs
intermittently (~1 in 1000 requests) when making TLS connections to
hosts with multiple DNS addresses
- When Happy Eyeballs (`autoSelectFamily`, enabled by default) fails on
the first address and falls back, `kReinitializeHandle` replaced the
`TLSWrap` with a raw TCP handle missing TLS methods
- Overrides `kReinitializeHandle` on `TLSSocket.prototype` to re-create
the `TLSWrap` around the new TCP handle, preserving callbacks
(`onhandshakedone`, `onerror`, `onread`) and TLS config (verify mode,
ALPN)

Closes #29070
B
Bartek Iwańczuk committed
ea33a86317ddce1ba20451177febd82df2239b5e
Parent: 04e47ba
Committed by GitHub <noreply@github.com> on 5/1/2026, 6:25:49 AM