Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-223

the data connection socket is not closed when an IOException occurred

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4
    • 2.0
    • None
    • None
    • Windows

    Description

      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();

      Attachments

        Activity

          People

            Unassigned Unassigned
            t-masaki Toshiaki Masaki
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: