the data connection socket is not closed when an IOException occurred
---------------------------------------------------------------------

                 Key: NET-223
                 URL: https://issues.apache.org/jira/browse/NET-223
             Project: Commons Net
          Issue Type: Bug
    Affects Versions: 1.4
         Environment: Windows
            Reporter: Toshiaki Masaki


In method FTPClient.initiateListParsing(FTPFileEntryParser, String), 
the data connection socket is not closed when an IOException(e.g. 
SocketTimeoutException)
occurred while calling FTPListParseEngine.readServerList().

> engine.readServerList(socket.getInputStream(), getControlEncoding());
> socket.close();

In other methods that open a data connection socket, like retrieveFile() and 
__storeFile(),
the socket is closed when an IOException occurred.

I think, the client should close the socket like the following.

> try {
>     engine.readServerList(socket.getInputStream(), getControlEncoding());
> } finally {
>     socket.close();

-- 
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