When trying to connect to an FTP server with TLS, I encounter issue with Deno.startTls.
Example:
import { FTPClient } from "https://raw.githubusercontent.com/nullobsi/ftpdeno/main/mod.ts";
const client = new FTPClient("ftp.dlptest.com", {
user: "dlpuser",
pass: "rNrKYTX9g7z3RgJRmxWuGHbeu",
port: 21,
tlsOpts: {
}
});
await client.connect();
console.log("Connected!");
$ deno run -A ftp.js
error: Uncaught (in promise) BadResource: TCP stream is currently in use
this.conn = await Deno.startTls(this.conn, {
^
at opStartTls (ext:deno_net/02_tls.js:10:15)
at Object.startTls (ext:deno_net/02_tls.js:88:57)
at FTPClient.connect (https://raw.githubusercontent.com/nullobsi/ftpdeno/main/classes/FTPClient.ts:170:27)
at eventLoopTick (ext:core/01_core.js:178:11)
When trying to connect to an FTP server with TLS, I encounter issue with
Deno.startTls.Example:
$ deno run -A ftp.js error: Uncaught (in promise) BadResource: TCP stream is currently in use this.conn = await Deno.startTls(this.conn, { ^ at opStartTls (ext:deno_net/02_tls.js:10:15) at Object.startTls (ext:deno_net/02_tls.js:88:57) at FTPClient.connect (https://raw.githubusercontent.com/nullobsi/ftpdeno/main/classes/FTPClient.ts:170:27) at eventLoopTick (ext:core/01_core.js:178:11)