Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.4
-
None
-
None
-
None
-
Operating System: All
Platform: PC
-
17066
Description
By repetitively calling
try {
// connect and login to the FTP server
ftpc.connect(getPropertyFromEnv("FTP_SERVER"));
ftpc.login(getPropertyFromEnv("USERNAME"), getPropertyFromEnv
("PASSWORD")); //technically we may have to break this into 2 blocks see
examples
// After connection attempt, check the reply code to verify success.
reply = ftpc.getReplyCode();
response = ftpc.getReplyString();
if(!FTPReply.isPositiveCompletion(reply))
{ System.err.println("FTP server refused connection or login."); killFTP(ftpc); ftpc = null; }} catch(IOException e)
{ System.err.println("Can't connect or login to server, reply = "+reply+ " response = " + response); killFTP(ftpc); ftpc = null; }and then
if (ftpc.isConnected()) {
try
catch (Exception e)
{ // do nothing System.out.println("Exception in ftpc.logout()"); }try
{ ftpc.disconnect(); }catch (Exception e)
{ // do nothing System.out.println("Exception in ftpc.disconnect()"); }}
one of the two bottom calls hangs and I'm assuming that it's in an infinite
loop waiting for something that the server isn't sending. We try and hook to
a Linux FTP server, and Windows FTP server and 99.99 % of the time it works,
but every once in a while, it hangs and we have to kill the FTP daemon. After
doing that everything works again!!!
Attachments
Issue Links
- is related to
-
NET-145 Deadlock in TelnetInputStream
- Closed