I am using the following code:
if( ! asciiType )
m_client.setType( FTPTransferType.BINARY );
else
m_client.setType( FTPTransferType.ASCII );
if(usePassive)
m_client.setConnectMode( FTPConnectMode.PASV );
else
m_client.setConnectMode( FTPConnectMode.ACTIVE);
m_client.put( file.getCanonicalPath(), remoteName );
Everything seems to work fine until I tried connecting to an FTP server over the internet. I can retrieve and put files on the server for a while, then suddenly it just hangs. It is not the local file as it happens on different files. I cannot seem to find any consistancy.
The server throws a 553 data transfer failed error, yet the client still sits there.
I have a timeout of 15000 on the socket, and it doesnt timeout either. I left it running for 5 minutes without a timeout exception.
This is happening on Windows XP running JDK 1.4.2-b28, edtftpj-1.4.5.
Thanks!