basic-ftp
basic-ftp copied to clipboard
Download file give 226 code, but promise not resolved and get TimeOut
Describe the bug When I download a file, except for very small files (less than 10ko), I got a timeout but the console show me a 226 code. Average of file size is 180ko
Example code
await ftpClient.ensureDir(directory)
var stream1 = new stream.PassThrough()
try {
await ftpClient.downloadTo(stream1, filename)
ftpClient.close()
return stream1
} catch(error) {
throw error
}
Console output
> EPSV
< 229 Entering Extended Passive Mode (|||55259|)
> RETR file.pdf
< 150 Opening data channel for file download from server of "/correct/path/file.pdf"
Downloading from XXX.XX.XXX.XXX:XXXXX (No encryption)
< 226 Successfully transferred "/correct/path/file.pdf"
The error I get:
Timeout (data socket)
Which version of Node.js are you using? Node 17.8.0
Additional context My nodejs server currently running in local on macOs. No idea about the FTPServer, it's provided by a partner. I use the last version of basic-ftp (5.0.1) And I had same issue with version 4.6.6