You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases when I rewrite file on ftps server file get size 0 bite. When I analyse your code I found error, in "connection.js -> FTP.prototype._store -> _pasv -> sendStore -> _send -> if (code === 150 || code === 125) -> if (isBuffer)" you send data without check that secure connection was established. As a result data not transferred to server server give code 150 and I was not see code 226. I make work around with setInterval and now it working good, but I think that my code so bad and it will be good if you resolve this issues because file with size 0 is not good.
PS. sorry for my bad English.
The text was updated successfully, but these errors were encountered:
if (isBuffer) //line 1066
dest.end(input); //line 1067
to
if (isBuffer){
var EstablishIntervalTime = 0;
var EstablishIntervalMax = 5000;
var EstablishIntervalStep = 10;
var EstablishInterval = setInterval(function(){
EstablishIntervalTime+=EstablishIntervalStep;
if (dest._secureEstablished){
dest.end(input);
clearInterval(EstablishInterval);
} else if (EstablishIntervalTime>EstablishIntervalMax) {
clearInterval(EstablishInterval);
throw new Error("Connection not established");
}
}, EstablishIntervalStep);
}
In some cases when I rewrite file on ftps server file get size 0 bite. When I analyse your code I found error, in "connection.js -> FTP.prototype._store -> _pasv -> sendStore -> _send -> if (code === 150 || code === 125) -> if (isBuffer)" you send data without check that secure connection was established. As a result data not transferred to server server give code 150 and I was not see code 226. I make work around with setInterval and now it working good, but I think that my code so bad and it will be good if you resolve this issues because file with size 0 is not good.
PS. sorry for my bad English.
The text was updated successfully, but these errors were encountered: