-
-
Notifications
You must be signed in to change notification settings - Fork 34.6k
Closed
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.tlsIssues and PRs related to the tls subsystem.Issues and PRs related to the tls subsystem.
Description
(EDIT by @Trott: Turns out this is a documentation bug. Labeling good-first-contribution and doc.)
"use strict";
const NetSocket = require("net").Socket;
const TlsSocket = require("tls").TLSSocket;
const tlsSocket = new TlsSocket(new NetSocket());
tlsSocket.once("connect", function doStartup () {
console.log("The tls socket connected. Yay!");
});
tlsSocket.connect({port: 6697, host: "irc.freenode.net"});
console.log("Sent connect.");The program ends immediately after the connect is called, telling me that the connection isn't started.
Note that if we don't wrap the net.Socket in a TLSSocket, then the connect works as expected.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.tlsIssues and PRs related to the tls subsystem.Issues and PRs related to the tls subsystem.