We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Version: Deno 2.0.4
This is a simplified example without any of my npm libraries or app code:
import net from "node:net"; import tls from "node:tls"; const socket = new net.Socket() socket.connect(5222, "scarlet.mboa.dev", () => { socket.write('<stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" id="bdf7acd2-e3b1-4b0a-afc4-10bb69821433" xml:lang="en" version="1.0" to="bots.cheogram.com">'); }); var x = 0; socket.on("data", (data) => { x++; if (x < 2) { socket.write('<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>'); } else { tls.connect({ socket: socket, host: "bots.cheogram.com" }, () => { console.log("TLS ON"); }); } })
I would expect to get TLS ON but instead I get Uncaught Error: Client network socket disconnected before secure TLS connection was established
TLS ON
Uncaught Error: Client network socket disconnected before secure TLS connection was established
This almost identical code works fine under nodejs:
import net from "net"; import tls from "tls"; const socket = new net.Socket() socket.connect(5222, "scarlet.mboa.dev", () => { socket.write('<stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" id="bdf7acd2-e3b1-4b0a-afc4-10bb69821433" xml:lang="en" version="1.0" to="bots.cheogram.com">'); }); var x = 0; socket.on("data", (data) => { x++; if (x < 2) { socket.write('<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>'); } else { tls.connect({ socket: socket, host: "bots.cheogram.com" }, () => { console.log("TLS ON"); }); } });
The text was updated successfully, but these errors were encountered:
tls.connect
1af2d24
fix(ext/node): tls.connect socket upgrades (#27125)
52bcd35
Fixes #27087 Fixes #26685 Fixes #26660
Successfully merging a pull request may close this issue.
Version: Deno 2.0.4
This is a simplified example without any of my npm libraries or app code:
I would expect to get
TLS ON
but instead I getUncaught Error: Client network socket disconnected before secure TLS connection was established
This almost identical code works fine under nodejs:
The text was updated successfully, but these errors were encountered: