Skip to content

Commit eaebf88

Browse files
authored
fix(ext/node): make kReinitializeHandle work for TLS wrap (#31079)
1 parent fc7ae0e commit eaebf88

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/node/polyfills/net.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1809,6 +1809,9 @@ Object.defineProperty(Socket.prototype, "_handle", {
18091809
Socket.prototype[kReinitializeHandle] = function (handle) {
18101810
this._handle?.close();
18111811

1812+
// Make sure TLS wrap works after reinitialize.
1813+
handle.afterConnectTls = this._handle.afterConnectTls;
1814+
18121815
this._handle = handle;
18131816
this._handle[ownerSymbol] = this;
18141817

0 commit comments

Comments
 (0)