Uploaded image for project: 'Commons VFS'
  1. Commons VFS
  2. VFS-559

FTPClientWrapper is not robust against some failures

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1
    • Labels:
      None

      Description

      The goal of the class is stated in javadoc:
      A wrapper to the FTPClient to allow automatic reconnect on connection loss.

      A lot of its methods look like :

      try

      { do something... }

      catch (final IOException e)

      { disconnect(); try to repeat the operation... }

      Unfortunately disonnect() can fail for the same reason as the original "do something". In my case it as a "connection reset". So instead of the original exception I was getting more or less the same exception from getFtpClient().quit();

      So the wrapper did not help at all.

      I guess all the disconnect() invocations must also be inside try/catch so that even if disconnect() throws, the method goes on to the next step: try to repeat the operation...

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                b.eckenfels Bernd Eckenfels
                Reporter:
                klv_m72 L
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: