In org.apache.commons.net.ftp.FTPClient
in method "protected Socket
openDataConnection(int command, String arg) throws
IOException" after server.accept() times out, it leaves the socket open in
listening mode and just progates the exception. It should close the socket
before propogating the exception.
// For now, let's just use the data timeout value for waiting for
// the data connection. It may be desirable to let this be a
// separately configurable value. In any case, we really want
// to allow preventing the accept from blocking indefinitely.
if (__dataTimeout >= 0)
server.setSoTimeout(__dataTimeout);
try{
socket = server.accept();
}catch(SocketTimeoutException ste){
server.close();
throw ste;
}
server.close();
}
else
{ .....
.....