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

[FTP] Socket timeout setting doesn't work if connect hangs

    Details

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

      Description

      The fix from VFS-216 doesn't help if the ftp server doesn't reply with any messages at all (could happen if it's behind a badly configured firewall for example). What happens is that the client.connect() called from FtpClientFactory hangs, and this line is before timeout parameter is set.

      I suggest the change in the attached patch.

      The scenario can be tested with "netcat -l" instead of a real ftp server.

        Attachments

        1. sotimeout_v2.patch
          1 kB
          Andreas Persson
        2. sotimeout.patch
          1 kB
          Andreas Persson

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                andreasp Andreas Persson
              • Votes:
                3 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: