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.

Reply via email to