Skip to content

Commit ed45f33

Browse files
committed
apply review suggestions
1 parent 2018d2d commit ed45f33

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

src/node/internal/internal_tls_wrap.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ TLSSocket.prototype._init = function _init(this: TLSSocket): void {
320320

321321
this.on('error', onerror.bind(this));
322322

323-
// This is thrown from net.Socket class.
323+
// This is emitted from net.Socket class.
324324
this.on('connectionAttempt', onnewsessionclient.bind(this));
325325

326326
if (options.handshakeTimeout && options.handshakeTimeout > 0)
@@ -418,21 +418,15 @@ TLSSocket.prototype._finishInit = function _finishInit(this: TLSSocket): void {
418418
if (
419419
this._tlsOptions.handshakeTimeout &&
420420
this._tlsOptions.handshakeTimeout > 0
421-
)
421+
) {
422422
this.setTimeout(0, this._handleTimeout.bind(this));
423+
}
424+
423425
this.emit('secure');
424426
};
425427

426428
TLSSocket.prototype._start = function _start(this: TLSSocket): void {
427-
if (this.connecting) {
428-
this.once('connect', this._start.bind(this));
429-
return;
430-
}
431-
432-
// Socket was destroyed before the connection was established
433-
if (!this._handle) return;
434-
435-
// this._handle.start();
429+
// Do nothing.
436430
};
437431

438432
TLSSocket.prototype.setServername = function setServername(

src/workerd/api/node/tests/tls-nodejs-tcp-server.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
33
// https://opensource.org/licenses/Apache-2.0
44

5-
// This file is used as a sidecar for the net-nodejs-test tests.
6-
// It creates 2 TCP servers to act as a source of truth for the node:net tests.
7-
// We execute this command using Node.js, which makes net.createServer available.
5+
// This file is used as a sidecar for the tls-nodejs-test tests.
86
const tls = require('node:tls');
97

108
// Taken from https://github.com/nodejs/node/blob/304743655d5236c2edc39094336ee2667600b684/test/fixtures/keys/agent1-key.pem

0 commit comments

Comments
 (0)