commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel F. Savarese" <>
Subject Re: [net] FTPClient.setSoTimeout() works difference in commons net 2.0 than early version?
Date Sun, 07 Nov 2010 19:19:07 GMT

In message <>, writes:
>The size of the file to upload is 100 Kb, so I thought that after the
>timeout expires, a SocketTimeOutException is thrown, even if there is
>still data communication between the FTPClient and the FTP server.

setSoTimeout is a timeout for the control connection.  It doesn't affect
the data connection, in which case setDataTimeout should be used instead.
It looks like the change between 1.3 and 2.0 is that the FTP class
subclasses TelnetClient in 1.3 and SocketClient in 2.0.  Therefore, an
inactive control connection will throw an exception because a thread will
be blocked in a read whereas in 2.0 there is no asynchronous control
connection.  The next command sent over the control connection in 2.0
would result in an exception.  Or so it seems on first glance.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message