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

ftp.auth() has very lengthy timeout #80

Closed
timburgess opened this issue Feb 4, 2014 · 0 comments
Closed

ftp.auth() has very lengthy timeout #80

timburgess opened this issue Feb 4, 2014 · 0 comments

Comments

@timburgess
Copy link

With a user supplied IP where there is no host at that IP, ftp.auth() takes a long time to throw ETIMEDOUT. Using the following code, on OS X I tested to a local IP with no device at that address. It took about 80 seconds to timeout. Shouldn't it be much less? I'm thinking 4-5 seconds (in terms of enduser patience until their mistake is evident).

var os = require("os"),
    fs = require("fs"),
 JSFtp = require("jsftp");

var HOST = '192.168.0.99';
var PORT;
var USER = 'tim';
var PWD = 'blah';
var ftp = new JSFtp({
    host: HOST
});
// connect to remote
ftp.auth(USER, PWD, function (err, data) {
    if (err) { 
        console.log('Failed to connect to remote: ' + err);
        return;
    }
    // emit connect
    console.log('Connected ' + data.text);
    ftp.raw.quit(function (err, data) {
        console.log('quit:' + data);
    });
});
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

2 participants