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

[net] FTPClient.setDataTimeout() should contain a default timeout

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: Windows 2000
      Platform: PC

    • Bugzilla Id:
      32949

      Description

      The method FTPClient.setDataTimeout() appears not to have a default value, or
      better said, it appears that the default value is 0, meaning that if a socket
      hangs (which will happen with an ftp connection eventually) you may block
      indefinately waiting on the connection.

      If we omit a call to setDataTimeout() it's almost certain that we will face a
      bug in our code later on, and unfortunately it's relatively unlikely that this
      bug will be caught in development. I think it would be far safer to have a
      default timeout value of say, pick a number, maybe 60 seconds? Those that need
      this changes should specically call it to make the change. If you do want it to
      block indefinately (I doubt almost anyone actually wants this) then they should
      explicitly set this to 0, but I think 99.9% of your users will actually want a
      resonable timeout, thus it would be best to set this 'resonable' timeout value
      as the default to safeguard those that miss adding it to their code.

      Thanks,
      David Parks

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              davidparks21@yahoo.com David Parks
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: