Skip to content
New issue

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

Operation timed out (tls false) #334

Open
web75018 opened this issue Aug 20, 2022 · 0 comments
Open

Operation timed out (tls false) #334

web75018 opened this issue Aug 20, 2022 · 0 comments

Comments

@web75018
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant