Skip to content
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

fix(node): TLSSocket._start #19996

Closed
wants to merge 3 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion ext/node/polyfills/_tls_wrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
constants as TCPConstants,
TCP,
} from "ext:deno_node/internal_binding/tcp_wrap.ts";
import { kHandle } from "ext:deno_node/internal/stream_base_commons.ts";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bartlomieju can you please also fix it as 0.177.2 for esm.sh? thanks!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bartlomieju can you please also fix it as 0.177.2 for esm.sh? thanks!

I don't think so, it will require a lot of changes and most likely be using APIs not available in 0.177.2.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

import {
constants as PipeConstants,
Pipe,
Expand Down Expand Up @@ -71,7 +72,7 @@ export class TLSSocket extends net.Socket {
[kPendingSession]: any;
[kConnectOptions]: any;
ssl: any;
_start: any;

constructor(socket: any, opts: any = kEmptyObject) {
const tlsOptions = { ...opts };

Expand Down Expand Up @@ -161,6 +162,10 @@ export class TLSSocket extends net.Socket {
}
}

_start() {
this[kHandle].afterConnect();
}

_tlsError(err: Error) {
this.emit("_tlsError", err);
if (this._controlReleased) {
Expand Down