Commons Net
  1. Commons Net
  2. NET-35

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


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

      Operating System: Windows 2000
      Platform: PC


      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.

      David Parks


        David Parks created issue -
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 32949 12341979
        Henri Yandell made changes -
        Project Commons [ 12310458 ] Commons Net [ 12310487 ]
        Key COM-1827 NET-35
        Component/s Net [ 12311127 ]
        Affects Version/s 1.2 Final [ 12311661 ]
        Assignee Jakarta Commons Developers Mailing List [ ]
        Henri Yandell made changes -
        Affects Version/s 1.2 Final [ 12311773 ]
        Henri Yandell made changes -
        Status Resolved [ 5 ] Closed [ 6 ]


          • Assignee:
            David Parks
          • Votes:
            0 Vote for this issue
            1 Start watching this issue


            • Created: