Skip to content

Operation timed out (tls false) #334

@web75018

Description

@web75018

Hi there.
Im using last package's version.

  • My issue is: Operation timed out.
  • Environment: production.
  • My config:

const FtpSrv = require('ftp-srv');
const port=5350;
const ftpServer = new FtpSrv({
url: "ftp://0.0.0.0:" + port,
anonymous: false,
file_format: "ls",
tls: false,
greeting: ["Hello"],
timeout: 6000,
});

ftpServer.on('login', ({ connection, username, password }, resolve, reject) => {
if (username === "login" && password === "pass") {
connection.on("STOR", (error, fileName) => {
if (error) {
console.error(
FTP server error: could not receive file ${fileName} for upload ${error}
);
}
else {
console.info(FTP server: plate number successfully received - ${fileName});
return resolve({ root:"/" });
}
});
}
return reject(new errors.GeneralError('Invalid username or password', 401));
});

ftpServer.listen().then(() => {
console.log('Ftp server is starting...')
});


Thanks for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions