Skip to content
Snippets Groups Projects
Commit 4af158c0 authored by deuce's avatar deuce
Browse files

If we get a 125 response, ensure the socket is, in fact, connected.

parent 9a83982a
Branches
Tags
No related merge requests found
......@@ -417,9 +417,16 @@ FTP.prototype.data_socket = function(cmd)
}
rstr = this.cmd(cmd, true);
if (parseInt(rstr, 10) !== 150) {
ds.close();
throw(cmd+" failed: " + rstr);
switch (parseInt(rstr, 10)) {
case 150:
break;
case 125:
if (ds.is_connected)
break;
// Fall-through
default:
ds.close();
throw(cmd+" failed: " + rstr);
}
if (!this.passive) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment