[Cyberduck-trac] [Cyberduck] #1353: FTP cannot list directory
Cyberduck
trac at trac.cyberduck.ch
Tue Dec 4 00:10:58 CET 2007
#1353: FTP cannot list directory
---------------------------------+------------------------------------------
Reporter: bkiziltan at gmail.com | Owner: dkocher
Type: defect | Status: new
Priority: high | Milestone:
Component: ftp | Version: 2.8.1
Severity: major | Resolution:
Keywords: |
---------------------------------+------------------------------------------
Comment (by soka):
FILE:
FTPControlSocket.java
FUNCTIONS:
createDataSocket() -> createDataSocketPASV()
PROBLEM DESCRIPTION:
"new FTPPassiveDataSocket(new Socket(ipAddress, port));"
This line of code is causing trouble. In case of passive mode "new Socket"
might time out. In that casel a ConnectException is thrown. This exception
is not taken to consideration. The 'fallback' is only watching
'FTPException' which in this case is not thrown, therefore there is no
fallback to 'active' mode.
SUGGESTION:
imho the current implementation is not taking care of the timeout. To my
understanding, according to
j2se/1.4.2/docs/api/java/net/Socket.html#setSoTimeout(int), it would be
possible to get a java.net.SocketTimeoutException.
I'm not a huge java developer so this is just a suggestion, please drop it
if it's not useful.
--
Ticket URL: <http://trac.cyberduck.ch/ticket/1353#comment:3>
Cyberduck <http://cyberduck.ch>
FTP and SFTP Browser for Mac OS X.
More information about the Cyberduck-trac
mailing list