Skip to content
Snippets Groups Projects
Commit 0cff1326 authored by deuce's avatar deuce
Browse files

Support response code 120 (expected delay) during connection.

parent f0babf1b
Branches
Tags
No related merge requests found
......@@ -32,6 +32,10 @@ function FTP(host, user, pass, port, dport, bindhost, account)
this.account = account;
this.socket = new ConnectedSocket(host, port, {protocol:'FTP', timeout:this.timeout, binadaddrs:this.bindhost});
var response = this.cmd(undefined, true);
if (parseInt(response, 10) !== 120) {
log(LOG_NOTICE, "Connection delay: "+response);
response = this.cmd(undefined, true);
}
if (parseInt(response, 10) !== 220) {
this.socket.close();
throw("Invalid response from server: " + response);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment