You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles Gaillard (JIRA)" <ji...@apache.org> on 2008/07/21 14:57:31 UTC

[jira] Commented: (VFS-215) Implementation of FtpInputStream.onClose should check for connection closed

    [ https://issues.apache.org/jira/browse/VFS-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615235#action_12615235 ] 

Gilles Gaillard commented on VFS-215:
-------------------------------------

The implementation of method onClose of FtpFileObject.FtpOutputStream should also catch FTPConnectionClosedException and ignore it.

> Implementation of FtpInputStream.onClose should check for connection closed
> ---------------------------------------------------------------------------
>
>                 Key: VFS-215
>                 URL: https://issues.apache.org/jira/browse/VFS-215
>             Project: Commons VFS
>          Issue Type: Bug
>            Reporter: Gilles Gaillard
>            Priority: Trivial
>
> Implementation of FtpFileObject.FtpInputStream.onClose has the following implementation:
> try {
>   ok = client.completePendingCommand();
> } finally {
>   ftpfs.putClient(client)
> }
> 1. When completePendingCommand return false,  the implementation should check for the reply code of the client and do:
>   if (FTPReply.TRANSFER_ABORTED==client.getReplyCode()){
>     ok = true;
>   }
>   (add method getReplyCode on the FtpClient / FTPClientWrapper)
> 2. The implementation should catch FTPConnectionClosedException and ignore it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.