Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
4k views
in Java FTP by (160 points)
Hi,

I'm using EDTFTP PRo/Java to connect a FTPS server. Large files are downloaded. I noticed that some FTP server
close the connection if the command channel is idle (it is idle, because the data channel is busy downloading large file).
So i'm wondering if there is a way to send KEEP_ALIVE on the command channel time to time (say, every 10 seconds)

Thanks


Sambava

3 Answers

0 votes
by (162k points)
You could just start a thread that calls noop() periodically.
0 votes
by (160 points)
Thanks.
I tried that but it seems to conflict with another pending FTP command.

On my main thread I do FTPClient.get(remoteFile), and on my new thread I call FTPClient.noOperation().
When calling noOperation(), it is throwing a FTPException and the message says "Transfer Complete"... so it looks like it's mixing the data
between the 2 threads.

Do I have to instantiate 2 FTPClient objects : one to perform the actual work and another one for the NOOP ?
0 votes
by (162k points)
The server doesn't allow noops during transfers (which is pretty common).

Usually the only thing that can be done here is to increase the idle time on the server.

Categories

...