commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anil Philip <goodnewsfor...@yahoo.com>
Subject Re: [commons ftp] help! FTPClient.isConnected() does not work.
Date Mon, 30 Oct 2006 00:24:32 GMT
Is it possible for me to access that call directly?
(So that my code will work)
thanks,
Anil


--- Rory Winston <rwinston@eircom.net> wrote:

> Thanks Anil.
> 
> I will change the code for the next version of [net]
> to use 
> _socket_.isConnected() instead.
> 
> Anil Philip wrote:
> > In my code, I do:
> >
> > if(!ftpClient.isConnected()) {
> > ...not connected, so connect to server
> > }
> >
> >
> >
> > However, when there is a timeout and the
> connection is
> > closed,
> > FTPClient.isConnected() incorrectly returns true.
> So
> > that the if is never entered,
> > but this exception is thrown when the connection
> is
> > assumed to be open, and used.
> >
> >
>
org.apache.commons.net.ftp.FTPConnectionClosedException:
> > FTP response 421 received.  Server
> > closed connection.
> > 	at
> >
>
org.apache.commons.net.ftp.FTP.__getReply(FTP.java:321)
> > 	at
> >
>
org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:460)
> > 	at
> >
>
org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:520)
> > 	at
> >
>
org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:569)
> > 	at
> org.apache.commons.net.ftp.FTP.pwd(FTP.java:1248)
> > 	at
> >
>
org.apache.commons.net.ftp.FTPClient.printWorkingDirectory(FTPClient.java:1809)
> >
> >
> > Is this a bug?
> >
> > thanks,
> > Anil Philip
> >
> >
> >  
> >
>
__________________________________________________________________________________________
> > Check out the New Yahoo! Mail - Fire up a more
> powerful email and get things done faster. 
> > (http://advision.webevents.yahoo.com/mailbeta) 
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> commons-user-help@jakarta.apache.org
> >
> >
> >
> >
> >   
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-user-help@jakarta.apache.org
> 
> 



 
____________________________________________________________________________________
Access over 1 million songs - Yahoo! Music Unlimited 
(http://music.yahoo.com/unlimited)


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message