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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Nightly Builds
    • 2.1
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: